提交 c9ecf989 编写于 作者: B Brian Foster 提交者: Miklos Szeredi

fuse: return -EIOCBQUEUED from fuse_direct_IO() for all async requests

If request submission fails for an async request (i.e.,
get_user_pages() returns -ERESTARTSYS), we currently skip the
-EIOCBQUEUED return and drop into wait_for_sync_kiocb() forever.

Avoid this by always returning -EIOCBQUEUED for async requests. If
an error occurs, the error is passed into fuse_aio_complete(),
returned via aio_complete() and thus propagated to userspace via
io_getevents().
Signed-off-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NMaxim Patlasov <MPatlasov@parallels.com>
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
上级 28420dad
...@@ -2432,7 +2432,7 @@ fuse_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, ...@@ -2432,7 +2432,7 @@ fuse_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
fuse_aio_complete(io, ret < 0 ? ret : 0, -1); fuse_aio_complete(io, ret < 0 ? ret : 0, -1);
/* we have a non-extending, async request, so return */ /* we have a non-extending, async request, so return */
if (ret > 0 && !is_sync_kiocb(iocb)) if (!is_sync_kiocb(iocb))
return -EIOCBQUEUED; return -EIOCBQUEUED;
ret = wait_on_sync_kiocb(iocb); ret = wait_on_sync_kiocb(iocb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册