[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] [PATCH v2] fuse: return -EIOCBQUEUED from fuse_direct_IO() for all async requests
From:       Maxim Patlasov <mpatlasov () parallels ! com>
Date:       2013-05-31 7:24:07
Message-ID: 51A85017.3000705 () parallels ! com
[Download RAW message or body]

05/30/2013 11:35 PM, Brian Foster пишет:
> 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: Brian Foster <bfoster@redhat.com>
Reviewed-by: Maxim Patlasov <MPatlasov@parallels.com>

> ---
>
> v2:
> - Reduced this patch to a one liner by setting the error on the kiocb
>    instead of breaking down the fuse_io_priv and returning the error via
>    io_submit(). Based on review by Maxim P.
> v1: http://sourceforge.net/mailarchive/message.php?msg_id=30914381
>
>   fs/fuse/file.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index d9f4679..b3ad8d6 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -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);
>   
>   		/* we have a non-extending, async request, so return */
> -		if (ret > 0 && !is_sync_kiocb(iocb))
> +		if (!is_sync_kiocb(iocb))
>   			return -EIOCBQUEUED;
>   
>   		ret = wait_on_sync_kiocb(iocb);


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic