* [Virtio-fs] Query about fuse ->sync_fs and virtiofs
@ 2021-04-12 14:59 ` Vivek Goyal
0 siblings, 0 replies; 8+ messages in thread
From: Vivek Goyal @ 2021-04-12 14:59 UTC (permalink / raw)
To: Miklos Szeredi, virtio-fs-list; +Cc: Linux fsdevel mailing list, Robert Krawitz
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?
Was looking for your thoughts on this before I look into implementing it.
Thanks
Vivek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Query about fuse ->sync_fs and virtiofs
@ 2021-04-12 14:59 ` Vivek Goyal
0 siblings, 0 replies; 8+ messages in thread
From: Vivek Goyal @ 2021-04-12 14:59 UTC (permalink / raw)
To: Miklos Szeredi, virtio-fs-list
Cc: Dr. David Alan Gilbert, Greg Kurz, Linux fsdevel mailing list,
Robert Krawitz
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?
Was looking for your thoughts on this before I look into implementing it.
Thanks
Vivek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Virtio-fs] Query about fuse ->sync_fs and virtiofs
2021-04-12 14:59 ` Vivek Goyal
@ 2021-04-12 15:08 ` Miklos Szeredi
-1 siblings, 0 replies; 8+ messages in thread
From: Miklos Szeredi @ 2021-04-12 15:08 UTC (permalink / raw)
To: Vivek Goyal; +Cc: virtio-fs-list, Linux fsdevel mailing list, Robert Krawitz
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.
Thanks,
Miklos
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Query about fuse ->sync_fs and virtiofs
@ 2021-04-12 15:08 ` Miklos Szeredi
0 siblings, 0 replies; 8+ messages in thread
From: Miklos Szeredi @ 2021-04-12 15:08 UTC (permalink / raw)
To: Vivek Goyal
Cc: virtio-fs-list, Dr. David Alan Gilbert, Greg Kurz,
Linux fsdevel mailing list, Robert Krawitz
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.
Thanks,
Miklos
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Virtio-fs] Query about fuse ->sync_fs and virtiofs
2021-04-12 15:08 ` Miklos Szeredi
@ 2021-04-14 11:56 ` Greg Kurz
-1 siblings, 0 replies; 8+ messages in thread
From: Greg Kurz @ 2021-04-14 11:56 UTC (permalink / raw)
To: Miklos Szeredi
Cc: virtio-fs-list, Linux fsdevel mailing list, Robert Krawitz,
Vivek Goyal
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Query about fuse ->sync_fs and virtiofs
@ 2021-04-14 11:56 ` Greg Kurz
0 siblings, 0 replies; 8+ messages in thread
From: Greg Kurz @ 2021-04-14 11:56 UTC (permalink / raw)
To: Miklos Szeredi
Cc: Vivek Goyal, virtio-fs-list, Dr. David Alan Gilbert,
Linux fsdevel mailing list, Robert Krawitz
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Virtio-fs] Query about fuse ->sync_fs and virtiofs
2021-04-14 11:56 ` Greg Kurz
@ 2021-04-14 11:58 ` Miklos Szeredi
-1 siblings, 0 replies; 8+ messages in thread
From: Miklos Szeredi @ 2021-04-14 11:58 UTC (permalink / raw)
To: Greg Kurz
Cc: virtio-fs-list, Linux fsdevel mailing list, Robert Krawitz,
Vivek Goyal
On Wed, Apr 14, 2021 at 1:56 PM Greg Kurz <groug@kaod.org> wrote:
>
> 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 ?
Yep, makes sense.
Thanks,
Miklos
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Query about fuse ->sync_fs and virtiofs
@ 2021-04-14 11:58 ` Miklos Szeredi
0 siblings, 0 replies; 8+ messages in thread
From: Miklos Szeredi @ 2021-04-14 11:58 UTC (permalink / raw)
To: Greg Kurz
Cc: Vivek Goyal, virtio-fs-list, Dr. David Alan Gilbert,
Linux fsdevel mailing list, Robert Krawitz
On Wed, Apr 14, 2021 at 1:56 PM Greg Kurz <groug@kaod.org> wrote:
>
> 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 ?
Yep, makes sense.
Thanks,
Miklos
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-04-14 14:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Virtio-fs] " Greg Kurz
2021-04-14 11:56 ` Greg Kurz
2021-04-14 11:58 ` [Virtio-fs] " Miklos Szeredi
2021-04-14 11:58 ` Miklos Szeredi
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.