From: Greg Kurz <groug@kaod.org>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
<virtualization@lists.linux-foundation.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
<linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<virtio-fs@redhat.com>, Robert Krawitz <rlk@redhat.com>
Subject: Re: [PATCH v2] virtiofs: propagate sync() to file server
Date: Fri, 30 Apr 2021 14:32:08 +0200 [thread overview]
Message-ID: <20210430143208.3d826302@bahia.lan> (raw)
In-Reply-To: <20210430121757.GA1936051@redhat.com>
On Fri, 30 Apr 2021 08:17:57 -0400
Vivek Goyal <vgoyal@redhat.com> wrote:
> On Tue, Apr 27, 2021 at 09:09:21PM +0200, Greg Kurz wrote:
> [..]
> > > > diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
> > > > index 54442612c48b..1265ca17620c 100644
> > > > --- a/include/uapi/linux/fuse.h
> > > > +++ b/include/uapi/linux/fuse.h
> > > > @@ -179,6 +179,9 @@
> > > > * 7.33
> > > > * - add FUSE_HANDLE_KILLPRIV_V2, FUSE_WRITE_KILL_SUIDGID, FATTR_KILL_SUIDGID
> > > > * - add FUSE_OPEN_KILL_SUIDGID
> > > > + *
> > > > + * 7.34
> > > > + * - add FUSE_SYNCFS
> > > > */
> > > >
> > > > #ifndef _LINUX_FUSE_H
> > > > @@ -214,7 +217,7 @@
> > > > #define FUSE_KERNEL_VERSION 7
> > > >
> > > > /** Minor version number of this interface */
> > > > -#define FUSE_KERNEL_MINOR_VERSION 33
> > > > +#define FUSE_KERNEL_MINOR_VERSION 34
> > > >
> > > > /** The node ID of the root inode */
> > > > #define FUSE_ROOT_ID 1
> > > > @@ -499,6 +502,7 @@ enum fuse_opcode {
> > > > FUSE_COPY_FILE_RANGE = 47,
> > > > FUSE_SETUPMAPPING = 48,
> > > > FUSE_REMOVEMAPPING = 49,
> > > > + FUSE_SYNCFS = 50,
> > > >
> > > > /* CUSE specific operations */
> > > > CUSE_INIT = 4096,
> > > > @@ -957,4 +961,8 @@ struct fuse_removemapping_one {
> > > > #define FUSE_REMOVEMAPPING_MAX_ENTRY \
> > > > (PAGE_SIZE / sizeof(struct fuse_removemapping_one))
> > > >
> > > > +struct fuse_syncfs_in {
> > > > + uint64_t flags;
> > > > +};
> > > > +
> > >
> > > Hi Greg,
> > >
> > > Will it be better if 32bits are for flags and reset 32 are
> > > padding and can be used in whatever manner.
> > >
> > > struct fuse_syncfs_in {
> > > uint32_t flags;
> > > uint32_t padding;
> > > };
> > >
> > > This will increase the flexibility if we were to send more information
> > > in future.
> > >
> > > I already see bunch of structures where flags are 32 bit and reset
> > > are padding bits. fuse_read_in, fuse_write_in, fuse_rename2_in etc.
> > >
> > > Thanks
> > > Vivek
> > >
> >
> > Yes, it makes sense. I'll wait a few more days and roll out a v3.
>
> Thinking more about it. We are not using any of the fields of this
> structure right now. So may be all of it can be padding and no need
> to add "flags".
>
> struct fuse_syncfs_in {
> uint64_t padding;
> };
>
> Essentially what you have already done :-). Just rename flags to
> padding/unused to make it clear its unused for now.
>
Yeah and this would allow to get rid of the assert() on non-zero flags
on the virtiofsd size, which was looking a bit awkward :-)
> Vivek
>
prev parent reply other threads:[~2021-04-30 12:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 15:10 [PATCH v2] virtiofs: propagate sync() to file server Greg Kurz
2021-04-27 17:12 ` Vivek Goyal
2021-04-27 19:09 ` Greg Kurz
2021-04-30 12:17 ` Vivek Goyal
2021-04-30 12:32 ` Greg Kurz [this message]
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=20210430143208.3d826302@bahia.lan \
--to=groug@kaod.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=rlk@redhat.com \
--cc=stefanha@redhat.com \
--cc=vgoyal@redhat.com \
--cc=virtio-fs@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/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).