All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: virtio-fs-list <virtio-fs@redhat.com>,
	Linux fsdevel mailing list <linux-fsdevel@vger.kernel.org>,
	Robert Krawitz <rkrawitz@redhat.com>,
	Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [Virtio-fs] Query about fuse ->sync_fs and virtiofs
Date: Wed, 14 Apr 2021 13:56:22 +0200	[thread overview]
Message-ID: <20210414135622.4d677fd7@bahia.lan> (raw)
In-Reply-To: <CAJfpegsaY05jSRNFTcquNFyMr+GMpPBMgoEO0YZcXxfqBi3g2A@mail.gmail.com>

On Mon, 12 Apr 2021 17:08:26 +0200
Miklos Szeredi <miklos@szeredi.hu> wrote:

> On Mon, Apr 12, 2021 at 4:59 PM Vivek Goyal <vgoyal@redhat.com> wrote:
> >
> > Hi Miklos,
> >
> > Robert Krawitz drew attention to the fact that fuse does not seem to
> > have a ->sync_fs implementation. That probably means that in case of
> > virtiofs, upon sync()/syncfs(), host cache will not be written back
> > to disk. And that's not something people expect.
> >
> > I read somewhere that fuse did not implement ->sync_fs because file
> > server might not be trusted and it could block sync().
> >
> > In case of virtiofs, file server is trusted entity (w.r.t guest kernel),
> > so it probably should be ok to implement ->sync_fs atleast for virtiofs?
> 
> Yes, that looks like a good idea.
> 

I've started looking into this. First observation is that implementing
->sync_fs() is file server agnostic, so if we want this to only be used
by a trusted file server, we need to introduce such a notion in FUSE.
Not sure where though... in struct fuse_fs_context maybe ?

> Thanks,
> Miklos


WARNING: multiple messages have this Message-ID (diff)
From: Greg Kurz <groug@kaod.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Vivek Goyal <vgoyal@redhat.com>,
	virtio-fs-list <virtio-fs@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Linux fsdevel mailing list <linux-fsdevel@vger.kernel.org>,
	Robert Krawitz <rkrawitz@redhat.com>
Subject: Re: Query about fuse ->sync_fs and virtiofs
Date: Wed, 14 Apr 2021 13:56:22 +0200	[thread overview]
Message-ID: <20210414135622.4d677fd7@bahia.lan> (raw)
In-Reply-To: <CAJfpegsaY05jSRNFTcquNFyMr+GMpPBMgoEO0YZcXxfqBi3g2A@mail.gmail.com>

On Mon, 12 Apr 2021 17:08:26 +0200
Miklos Szeredi <miklos@szeredi.hu> wrote:

> On Mon, Apr 12, 2021 at 4:59 PM Vivek Goyal <vgoyal@redhat.com> wrote:
> >
> > Hi Miklos,
> >
> > Robert Krawitz drew attention to the fact that fuse does not seem to
> > have a ->sync_fs implementation. That probably means that in case of
> > virtiofs, upon sync()/syncfs(), host cache will not be written back
> > to disk. And that's not something people expect.
> >
> > I read somewhere that fuse did not implement ->sync_fs because file
> > server might not be trusted and it could block sync().
> >
> > In case of virtiofs, file server is trusted entity (w.r.t guest kernel),
> > so it probably should be ok to implement ->sync_fs atleast for virtiofs?
> 
> Yes, that looks like a good idea.
> 

I've started looking into this. First observation is that implementing
->sync_fs() is file server agnostic, so if we want this to only be used
by a trusted file server, we need to introduce such a notion in FUSE.
Not sure where though... in struct fuse_fs_context maybe ?

> Thanks,
> Miklos


  reply	other threads:[~2021-04-14 11:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 14:59 [Virtio-fs] Query about fuse ->sync_fs and virtiofs Vivek Goyal
2021-04-12 14:59 ` Vivek Goyal
2021-04-12 15:08 ` [Virtio-fs] " Miklos Szeredi
2021-04-12 15:08   ` Miklos Szeredi
2021-04-14 11:56   ` Greg Kurz [this message]
2021-04-14 11:56     ` Greg Kurz
2021-04-14 11:58     ` [Virtio-fs] " Miklos Szeredi
2021-04-14 11:58       ` 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=20210414135622.4d677fd7@bahia.lan \
    --to=groug@kaod.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=rkrawitz@redhat.com \
    --cc=vgoyal@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 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.