From: Vivek Goyal <vgoyal@redhat.com>
To: JeffleXu <jefflexu@linux.alibaba.com>
Cc: miklos@szeredi.hu, virtio-fs@redhat.com,
joseph.qi@linux.alibaba.com, linux-fsdevel@vger.kernel.org
Subject: Re: [Virtio-fs] [PATCH v6 4/7] fuse: negotiate per-file DAX in FUSE_INIT
Date: Wed, 20 Oct 2021 11:44:53 -0400 [thread overview]
Message-ID: <YXA5dWiJseIcdxiH@redhat.com> (raw)
In-Reply-To: <778cd99d-fb40-1135-5d62-58a008c14919@linux.alibaba.com>
On Wed, Oct 20, 2021 at 11:10:30AM +0800, JeffleXu wrote:
>
>
> On 10/18/21 10:30 PM, Vivek Goyal wrote:
> > On Mon, Oct 11, 2021 at 11:00:49AM +0800, Jeffle Xu wrote:
> >> Among the FUSE_INIT phase, client shall advertise per-file DAX if it's
> >> mounted with "-o dax=inode". Then server is aware that client is in
> >> per-file DAX mode, and will construct per-inode DAX attribute
> >> accordingly.
> >>
> >> Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
> >> ---
> >> fs/fuse/inode.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
> >> index b4b41683e97e..f4ad99e2415b 100644
> >> --- a/fs/fuse/inode.c
> >> +++ b/fs/fuse/inode.c
> >> @@ -1203,6 +1203,8 @@ void fuse_send_init(struct fuse_mount *fm)
> >> #ifdef CONFIG_FUSE_DAX
> >> if (fm->fc->dax)
> >> ia->in.flags |= FUSE_MAP_ALIGNMENT;
> >> + if (fm->fc->dax_mode == FUSE_DAX_INODE)
> >> + ia->in.flags |= FUSE_PERFILE_DAX;
> >
> > Are you not keeping track of server's response whether server supports
> > per inode dax or not. Client might be new and server might be old and
> > server might not support per inode dax. In that case, we probably
> > should error out if user mounted with "-o dax=inode".
> >
>
> Yes, if guest virtiofs is mounted with '-o dax=inode' while virtiofsd is
> old and doesn't support per inode dax, then guest virtiofs will never
> receive FUSE_ATTR_DAX and actually behaves as '-o dax=never'. So the
> whole system works in this case, though the behavior may be beyond the
> expectation of users ....
>
> If the behavior really matters, I could change the behavior and fail
> directly if virtiofsd doesn't advertise supporting per inode DAX.
I think it probably is better to error out if client asked for per-inode
DAX and server does not support it.
Vivek
>
> --
> Thanks,
> Jeffle
>
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: JeffleXu <jefflexu@linux.alibaba.com>
Cc: stefanha@redhat.com, miklos@szeredi.hu,
linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com,
bo.liu@linux.alibaba.com, joseph.qi@linux.alibaba.com
Subject: Re: [PATCH v6 4/7] fuse: negotiate per-file DAX in FUSE_INIT
Date: Wed, 20 Oct 2021 11:44:53 -0400 [thread overview]
Message-ID: <YXA5dWiJseIcdxiH@redhat.com> (raw)
In-Reply-To: <778cd99d-fb40-1135-5d62-58a008c14919@linux.alibaba.com>
On Wed, Oct 20, 2021 at 11:10:30AM +0800, JeffleXu wrote:
>
>
> On 10/18/21 10:30 PM, Vivek Goyal wrote:
> > On Mon, Oct 11, 2021 at 11:00:49AM +0800, Jeffle Xu wrote:
> >> Among the FUSE_INIT phase, client shall advertise per-file DAX if it's
> >> mounted with "-o dax=inode". Then server is aware that client is in
> >> per-file DAX mode, and will construct per-inode DAX attribute
> >> accordingly.
> >>
> >> Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
> >> ---
> >> fs/fuse/inode.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
> >> index b4b41683e97e..f4ad99e2415b 100644
> >> --- a/fs/fuse/inode.c
> >> +++ b/fs/fuse/inode.c
> >> @@ -1203,6 +1203,8 @@ void fuse_send_init(struct fuse_mount *fm)
> >> #ifdef CONFIG_FUSE_DAX
> >> if (fm->fc->dax)
> >> ia->in.flags |= FUSE_MAP_ALIGNMENT;
> >> + if (fm->fc->dax_mode == FUSE_DAX_INODE)
> >> + ia->in.flags |= FUSE_PERFILE_DAX;
> >
> > Are you not keeping track of server's response whether server supports
> > per inode dax or not. Client might be new and server might be old and
> > server might not support per inode dax. In that case, we probably
> > should error out if user mounted with "-o dax=inode".
> >
>
> Yes, if guest virtiofs is mounted with '-o dax=inode' while virtiofsd is
> old and doesn't support per inode dax, then guest virtiofs will never
> receive FUSE_ATTR_DAX and actually behaves as '-o dax=never'. So the
> whole system works in this case, though the behavior may be beyond the
> expectation of users ....
>
> If the behavior really matters, I could change the behavior and fail
> directly if virtiofsd doesn't advertise supporting per inode DAX.
I think it probably is better to error out if client asked for per-inode
DAX and server does not support it.
Vivek
>
> --
> Thanks,
> Jeffle
>
next prev parent reply other threads:[~2021-10-20 15:44 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 3:00 [Virtio-fs] [PATCH v6 0/7] fuse,virtiofs: support per-file DAX Jeffle Xu
2021-10-11 3:00 ` Jeffle Xu
2021-10-11 3:00 ` [Virtio-fs] [PATCH v6 1/7] fuse: add fuse_should_enable_dax() helper Jeffle Xu
2021-10-11 3:00 ` Jeffle Xu
2021-10-11 3:00 ` [Virtio-fs] [PATCH v6 2/7] fuse: make DAX mount option a tri-state Jeffle Xu
2021-10-11 3:00 ` Jeffle Xu
2021-10-18 14:10 ` [Virtio-fs] " Vivek Goyal
2021-10-18 14:10 ` Vivek Goyal
2021-10-20 2:52 ` [Virtio-fs] " JeffleXu
2021-10-20 2:52 ` JeffleXu
2021-10-20 14:48 ` [Virtio-fs] " Vivek Goyal
2021-10-20 14:48 ` Vivek Goyal
2021-10-29 8:33 ` [Virtio-fs] " JeffleXu
2021-10-29 8:33 ` JeffleXu
2021-10-29 13:03 ` [Virtio-fs] " Vivek Goyal
2021-10-29 13:03 ` Vivek Goyal
2021-11-01 8:21 ` [Virtio-fs] " JeffleXu
2021-11-01 8:21 ` JeffleXu
2021-10-20 15:17 ` [Virtio-fs] " Vivek Goyal
2021-10-20 15:17 ` Vivek Goyal
2021-10-22 6:54 ` [Virtio-fs] " JeffleXu
2021-10-22 6:54 ` JeffleXu
2021-10-25 17:52 ` [Virtio-fs] " Ira Weiny
2021-10-25 17:52 ` Ira Weiny
2021-10-25 18:12 ` [Virtio-fs] " Vivek Goyal
2021-10-25 18:12 ` Vivek Goyal
2021-10-25 19:02 ` [Virtio-fs] " Ira Weiny
2021-10-25 19:02 ` Ira Weiny
2021-10-25 19:33 ` [Virtio-fs] " Vivek Goyal
2021-10-25 19:33 ` Vivek Goyal
2021-10-25 20:41 ` [Virtio-fs] " Ira Weiny
2021-10-25 20:41 ` Ira Weiny
2021-10-26 13:45 ` [Virtio-fs] " Vivek Goyal
2021-10-26 13:45 ` Vivek Goyal
2021-10-27 6:00 ` [Virtio-fs] " JeffleXu
2021-10-27 6:00 ` JeffleXu
2021-10-11 3:00 ` [Virtio-fs] [PATCH v6 3/7] fuse: support per-file DAX in fuse protocol Jeffle Xu
2021-10-11 3:00 ` Jeffle Xu
2021-10-18 14:14 ` [Virtio-fs] " Vivek Goyal
2021-10-18 14:14 ` Vivek Goyal
2021-10-18 14:20 ` [Virtio-fs] " Vivek Goyal
2021-10-18 14:20 ` Vivek Goyal
2021-10-20 3:04 ` [Virtio-fs] " JeffleXu
2021-10-20 3:04 ` JeffleXu
2021-10-20 14:54 ` [Virtio-fs] " Vivek Goyal
2021-10-20 14:54 ` Vivek Goyal
2021-10-11 3:00 ` [Virtio-fs] [PATCH v6 4/7] fuse: negotiate per-file DAX in FUSE_INIT Jeffle Xu
2021-10-11 3:00 ` Jeffle Xu
2021-10-18 14:30 ` [Virtio-fs] " Vivek Goyal
2021-10-18 14:30 ` Vivek Goyal
2021-10-20 3:10 ` [Virtio-fs] " JeffleXu
2021-10-20 3:10 ` JeffleXu
2021-10-20 15:44 ` Vivek Goyal [this message]
2021-10-20 15:44 ` Vivek Goyal
2021-10-11 3:00 ` [Virtio-fs] [PATCH v6 5/7] fuse: enable per-file DAX Jeffle Xu
2021-10-11 3:00 ` Jeffle Xu
2021-10-18 15:11 ` [Virtio-fs] " Vivek Goyal
2021-10-18 15:11 ` Vivek Goyal
2021-10-11 3:00 ` [Virtio-fs] [PATCH v6 6/7] fuse: mark inode DONT_CACHE when per-file DAX hint changes Jeffle Xu
2021-10-11 3:00 ` Jeffle Xu
2021-10-18 15:19 ` [Virtio-fs] " Vivek Goyal
2021-10-18 15:19 ` Vivek Goyal
2021-10-27 5:05 ` [Virtio-fs] " JeffleXu
2021-10-27 5:05 ` JeffleXu
2021-10-11 3:00 ` [Virtio-fs] [PATCH v6 7/7] Documentation/filesystem/dax: record DAX on virtiofs Jeffle Xu
2021-10-11 3:00 ` Jeffle Xu
2021-10-15 3:33 ` [Virtio-fs] [PATCH v6 0/7] fuse,virtiofs: support per-file DAX JeffleXu
2021-10-15 3:33 ` JeffleXu
2021-10-18 15:21 ` [Virtio-fs] " Vivek Goyal
2021-10-18 15:21 ` Vivek Goyal
2021-10-20 5:22 ` [Virtio-fs] " JeffleXu
2021-10-20 5:22 ` JeffleXu
2021-10-20 16:06 ` [Virtio-fs] " Vivek Goyal
2021-10-20 16:06 ` Vivek Goyal
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=YXA5dWiJseIcdxiH@redhat.com \
--to=vgoyal@redhat.com \
--cc=jefflexu@linux.alibaba.com \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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.