[LU-13900] don't call aio_complete() in lustre upon errors Created: 11/Aug/20 Updated: 06/Mar/21 Resolved: 19/Sep/20 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.14.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Wang Shilong (Inactive) | Assignee: | Wang Shilong (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
See following codes in aio_ret(): static inline ssize_t aio_ret(struct kiocb *req, ssize_t ret)
{
switch (ret) {
case -EIOCBQUEUED:
return ret;
case -ERESTARTSYS:
case -ERESTARTNOINTR:
case -ERESTARTNOHAND:
case -ERESTART_RESTARTBLOCK:
/*
* There's no easy way to restart the
* syscall since other AIO's may be already running.
* Just fail this IO with EINTR.
*/
ret = -EINTR;
/*FALLTHRU*/
default:
aio_complete(req, ret, 0);
return 0;
}
}
VFS will call aio_complete() if ret is not -EIOCBQUEUED, So in Lustre, we need be careful to handle this case to avoid double |
| Comments |
| Comment by Gerrit Updater [ 11/Aug/20 ] |
|
Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39636 |
| Comment by Gerrit Updater [ 19/Sep/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39636/ |
| Comment by Peter Jones [ 19/Sep/20 ] |
|
Landed for 2.14 |