From: Vivek Goyal <vgoyal@redhat.com>
To: Linux fsdevel mailing list <linux-fsdevel@vger.kernel.org>,
Miklos Szeredi <miklos@szeredi.hu>
Cc: virtio-fs-list <virtio-fs@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH] virtiofs: Fail dax mount if device does not support it
Date: Fri, 5 Mar 2021 08:34:01 -0500 [thread overview]
Message-ID: <20210305133401.GA109162@redhat.com> (raw)
In-Reply-To: <20210209224754.GG3171@redhat.com>
On Tue, Feb 09, 2021 at 05:47:54PM -0500, Vivek Goyal wrote:
> Right now "mount -t virtiofs -o dax myfs /mnt/virtiofs" succeeds even
> if filesystem deivce does not have a cache window and hence DAX can't
> be supported.
>
> This gives a false sense to user that they are using DAX with virtiofs
> but fact of the matter is that they are not.
>
> Fix this by returning error if dax can't be supported and user has asked
> for it.
Hi Miklos,
Did you get a chance to look at this patch.
Vivek
>
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
> ---
> fs/fuse/virtio_fs.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> Index: redhat-linux/fs/fuse/virtio_fs.c
> ===================================================================
> --- redhat-linux.orig/fs/fuse/virtio_fs.c 2021-02-04 10:40:21.704370721 -0500
> +++ redhat-linux/fs/fuse/virtio_fs.c 2021-02-09 15:56:45.693653979 -0500
> @@ -1324,8 +1324,15 @@ static int virtio_fs_fill_super(struct s
>
> /* virtiofs allocates and installs its own fuse devices */
> ctx->fudptr = NULL;
> - if (ctx->dax)
> + if (ctx->dax) {
> + if (!fs->dax_dev) {
> + err = -EINVAL;
> + pr_err("virtio-fs: dax can't be enabled as filesystem"
> + " device does not support it.\n");
> + goto err_free_fuse_devs;
> + }
> ctx->dax_dev = fs->dax_dev;
> + }
> err = fuse_fill_super_common(sb, ctx);
> if (err < 0)
> goto err_free_fuse_devs;
next prev parent reply other threads:[~2021-03-05 13:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 22:47 [PATCH] virtiofs: Fail dax mount if device does not support it Vivek Goyal
2021-02-10 14:58 ` Stefan Hajnoczi
2021-03-05 13:34 ` Vivek Goyal [this message]
2021-03-05 14:48 ` Miklos Szeredi
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=20210305133401.GA109162@redhat.com \
--to=vgoyal@redhat.com \
--cc=dgilbert@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=stefanha@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).