From: Vivek Goyal <email@example.com>
To: Miklos Szeredi <firstname.lastname@example.org>
Cc: Greg Kurz <email@example.com>,
QEMU Developers <firstname.lastname@example.org>,
email@example.com, "Michael S. Tsirkin" <firstname.lastname@example.org>,
Cornelia Huck <email@example.com>,
Miklos Szeredi <firstname.lastname@example.org>,
Paolo Bonzini <email@example.com>
Subject: Re: [Virtio-fs] [for-6.1 v3 3/3] virtiofsd: Add support for FUSE_SYNCFS request
Date: Tue, 11 May 2021 11:16:26 -0400 [thread overview]
Message-ID: <20210511151626.GC238488@horse> (raw)
On Tue, May 11, 2021 at 05:08:42PM +0200, Miklos Szeredi wrote:
> On Tue, May 11, 2021 at 4:49 PM Vivek Goyal <firstname.lastname@example.org> wrote:
> > On Tue, May 11, 2021 at 08:54:09AM -0400, Vivek Goyal wrote:
> > > On Tue, May 11, 2021 at 02:31:14PM +0200, Miklos Szeredi wrote:
> > > > On Mon, May 10, 2021 at 5:55 PM Greg Kurz <email@example.com> wrote:
> > > > >
> > > > > Honor the expected behavior of syncfs() to synchronously flush all data
> > > > > and metadata on linux systems. Simply loop on all known submounts and
> > > > > call syncfs() on them.
> > > >
> > > > Why not pass the submount's root to the server, so it can do just one
> > > > targeted syncfs?
> > > >
> > > > E.g. somehting like this in fuse_sync_fs():
> > > >
> > > > args.nodeid = get_node_id(sb->s_root->d_inode);
> > >
> > > Hi Miklos,
> > >
> > > I think current proposal was due to lack of full understanding on my part.
> > > I was assuming we have one super block in client and that's not the case
> > > looks like. For every submount, we will have another superblock known
> > > to vfs, IIUC. That means when sync() happens, we will receive ->syncfs()
> > > for each of those super blocks. And that means file server does not
> > > have to keep track of submounts explicitly and it will either receive
> > > a single targeted SYNCFS (for the case of syncfs(fd)) or receive
> > > multile SYNCFS calls (one for each submount when sync() is called).
> > Tried sync() with submounts enabled and we are seeing a SYNCFS call
> > only for top level super block and not for submounts.
> > Greg noticed that it probably is due to the fact that iterate_super()
> > skips super blocks which don't have SB_BORN flag set.
> > Only vfs_get_tree() seems to set SB_BORN and for our submounts we
> > are not calling vfs_get_tree(), hence SB_BORN is not set. NFS seems
> > to call vfs_get_tree() and hence SB_BORN must be set for submounts.
> > Maybe we need to modify virtio_fs_get_tree() so that it can deal with
> > mount as well as submounts and then fuse_dentry_automount() should
> > probably call vfs_get_tree() and that should set SB_BORN and hopefully
> > sync() will work with it. Greg is planning to give it a try.
> > Does it sound reasonable.
> Just setting SB_BORN sounds much simpler. What's the disadvantage?
I was little hesitant to set it directly because no other filesystem
seems to be doing it. Hence I assumed that VFS expects filesystems to
not set SB_BORN.
But I do agree that setting SB_BORN in automount code is much simpler
next prev parent reply other threads:[~2021-05-11 15:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 15:55 [for-6.1 v3 0/3] virtiofsd: Add support for FUSE_SYNCFS request Greg Kurz
2021-05-10 15:55 ` [for-6.1 v3 2/3] virtiofsd: Track mounts Greg Kurz
2021-05-10 19:18 ` Vivek Goyal
2021-05-11 10:06 ` Greg Kurz
2021-05-10 15:55 ` [for-6.1 v3 3/3] virtiofsd: Add support for FUSE_SYNCFS request Greg Kurz
2021-05-10 19:15 ` Vivek Goyal
2021-05-11 10:09 ` Greg Kurz
2021-05-11 12:31 ` [Virtio-fs] " Miklos Szeredi
2021-05-11 12:54 ` Vivek Goyal
2021-05-11 14:49 ` Vivek Goyal
2021-05-11 15:08 ` Miklos Szeredi
2021-05-11 15:16 ` Vivek Goyal [this message]
2021-05-11 15:08 ` Greg Kurz
2021-05-10 15:58 ` [for-6.1 v3 0/3] " Greg Kurz
2021-11-10 19:48 ` Vivek Goyal
2021-11-15 14:30 ` Greg Kurz
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).