[Devel] [PATCH] fuse kio: Return possibility to handle files served in userspace

Pavel Butsykin pbutsykin at virtuozzo.com
Wed Oct 10 19:59:18 MSK 2018



On 10.10.2018 19:43, Kirill Tkhai wrote:
> Fallback to old behavior, when !fi->private files are
> served in userspace.
> 
> https://pmc.acronis.com/browse/VSTOR-15947
> 
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>

Acked-by: Pavel Butsykin <pbutsykin at virtuozzo.com>

> ---
>   fs/fuse/kio/pcs/pcs_fuse_kdirect.c |    8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
> index cd059b28d940..14bed318d139 100644
> --- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
> +++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
> @@ -1073,8 +1073,10 @@ static int pcs_kio_classify_req(struct fuse_conn *fc, struct fuse_req *req, bool
>   	case FUSE_SETATTR: {
>   		struct fuse_setattr_in const *inarg = req->in.args[0].value;
>   
> -		if (unlikely(!fi || !fi->private))
> +		if (unlikely(!fi))
>   			goto fail;
> +		if (!fi->private)
> +			return 1;
>   		if (!(inarg->valid & FATTR_SIZE))
>   			return 1;
>   		if (lk)
> @@ -1096,8 +1098,10 @@ static int pcs_kio_classify_req(struct fuse_conn *fc, struct fuse_req *req, bool
>   		return 1;
>   	}
>   
> -	if (unlikely(!fi || !fi->private))
> +	if (unlikely(!fi))
>   		goto fail;
> +	if (!fi->private)
> +		return 1;
>   
>   	return 0;
>   
> 



More information about the Devel mailing list