From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peng Tao <tao.peng@linux.alibaba.com>
Cc: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] [PATCH] virtiofsd: do not always set FUSE_FLOCK_LOCKS
Date: Mon, 5 Aug 2019 17:16:43 +0100 [thread overview]
Message-ID: <20190805161643.GO13734@work-vm> (raw)
In-Reply-To: <1564744343-8087-1-git-send-email-tao.peng@linux.alibaba.com>
* Peng Tao (tao.peng@linux.alibaba.com) wrote:
> Right now we always enable it regardless of given commandlines.
> Fix it by setting the flag relying on the lo->flock bit.
>
> Signed-off-by: Peng Tao <tao.peng@linux.alibaba.com>
Thanks, applied.
> ---
> contrib/virtiofsd/passthrough_ll.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/contrib/virtiofsd/passthrough_ll.c b/contrib/virtiofsd/passthrough_ll.c
> index a81c01d..be75cb8 100644
> --- a/contrib/virtiofsd/passthrough_ll.c
> +++ b/contrib/virtiofsd/passthrough_ll.c
> @@ -440,10 +440,16 @@ static void lo_init(void *userdata,
> fuse_debug("lo_init: activating writeback\n");
> conn->want |= FUSE_CAP_WRITEBACK_CACHE;
> }
> - if (lo->flock && conn->capable & FUSE_CAP_FLOCK_LOCKS) {
> - if (lo->debug)
> - fuse_debug("lo_init: activating flock locks\n");
> - conn->want |= FUSE_CAP_FLOCK_LOCKS;
> + if (conn->capable & FUSE_CAP_FLOCK_LOCKS) {
> + if (lo->flock) {
> + if (lo->debug)
> + fuse_debug("lo_init: activating flock locks\n");
> + conn->want |= FUSE_CAP_FLOCK_LOCKS;
> + } else {
> + if (lo->debug)
> + fuse_debug("lo_init: disabling flock locks\n");
> + conn->want &= ~FUSE_CAP_FLOCK_LOCKS;
> + }
> }
> /* TODO: shared version support for readdirplus */
>
> --
> 1.8.3.1
>
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
prev parent reply other threads:[~2019-08-05 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-02 11:12 [Virtio-fs] [PATCH] virtiofsd: do not always set FUSE_FLOCK_LOCKS Peng Tao
2019-08-02 23:06 ` Liu Bo
2019-08-05 16:16 ` Dr. David Alan Gilbert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190805161643.GO13734@work-vm \
--to=dgilbert@redhat.com \
--cc=tao.peng@linux.alibaba.com \
--cc=virtio-fs@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.