Re: [Devel] [PATCH 2/2] fuse kio: Differ fuse_pcs_kdirect_claim_op() return values
On 11.10.2018 18:00, Kirill Tkhai wrote: > Fail open in case of fuse_get_req() was failed, > and leave it successful in case of vstorage-mount > said we can't claim file by kio (e.g., file will > be served by userspace). > > Signed-off-by: Kirill Tkhai Reviewed-by: Pavel Butsykin > --- > fs/fuse/kio/pcs/pcs_fuse_kdirect.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c > b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c > index f221001519c3..d56cbc542542 100644 > --- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c > +++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c > @@ -293,7 +293,7 @@ static int fuse_pcs_kdirect_claim_op(struct fuse_conn > *fc, struct file *file, > if (req->out.h.error || outarg->result) { > TRACE("h.err:%d result:%d\n", > req->out.h.error, outarg->result); > - err = req->out.h.error ? req->out.h.error : outarg->result; > + err = -EOPNOTSUPP; > } > > fuse_put_request(fc, req); > @@ -347,7 +347,7 @@ static int kpcs_do_file_open(struct fuse_conn *fc, struct > file *file, struct ino > pcs_mapping_deinit(>mapping); > kfree(di); > /* Claim error means we cannot claim, just that */ > - return 0; > + return (ret == -EOPNOTSUPP ? 0: ret); > } > /* TODO: Propper initialization of dentry should be here!!! */ > fi->private = di; > ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel
[Devel] [PATCH 2/2] fuse kio: Differ fuse_pcs_kdirect_claim_op() return values
Fail open in case of fuse_get_req() was failed, and leave it successful in case of vstorage-mount said we can't claim file by kio (e.g., file will be served by userspace). Signed-off-by: Kirill Tkhai --- fs/fuse/kio/pcs/pcs_fuse_kdirect.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c index f221001519c3..d56cbc542542 100644 --- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c +++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c @@ -293,7 +293,7 @@ static int fuse_pcs_kdirect_claim_op(struct fuse_conn *fc, struct file *file, if (req->out.h.error || outarg->result) { TRACE("h.err:%d result:%d\n", req->out.h.error, outarg->result); - err = req->out.h.error ? req->out.h.error : outarg->result; + err = -EOPNOTSUPP; } fuse_put_request(fc, req); @@ -347,7 +347,7 @@ static int kpcs_do_file_open(struct fuse_conn *fc, struct file *file, struct ino pcs_mapping_deinit(>mapping); kfree(di); /* Claim error means we cannot claim, just that */ - return 0; + return (ret == -EOPNOTSUPP ? 0: ret); } /* TODO: Propper initialization of dentry should be here!!! */ fi->private = di; ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel