Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp287214pxy; Fri, 30 Apr 2021 05:35:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyc+HnrVGquA1+9zA6yUH/rkzTuPBRxAchWpj+NN0FsX66nt8EWF8Vkw53erWscLFuOii1O X-Received: by 2002:a17:902:dac2:b029:ec:7fcb:1088 with SMTP id q2-20020a170902dac2b02900ec7fcb1088mr4950018plx.65.1619786100739; Fri, 30 Apr 2021 05:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619786100; cv=none; d=google.com; s=arc-20160816; b=xhm6U9VxIPzU98IJLy/z/YMcdCd3GnARDgpgQgkE1Y2G8M2ZgUBAR1kcB+8wYSjl9d Yprp0n/2xWSgYrTH1wLQDJugYz1bu2U3hjw8nHztbJU0w97EgG10ROnqxfyFklxAWO0K lyaPUwysh6QZGjPWkQrrzcV41VIsLSCiT6gPSecCtL1pT5O3mYjpk757hVhsyWwbLDRU t9wt8aGiNWFfGYm7Brw8lyzbbn/vr5YaT7NGxmiZDMQmQY6QPPPnZaHfzoHVCsJ4emIb 7rNhoXKT4LX1fHX3MxobZva3SdqydwwbPQYUJyPU52TY3Rq1sqFc9V/XqNuoxYc9/62+ BhHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=6urqUqnZicgKOO2dF9ScnO5bAVe8hFf7xFgunjYFh9w=; b=FTR12WMpjOnLK7fpDAe9iPBx0lFMdMFio35u4Y71SW8GJUGLe29MdweibaPJxkrSyg +4S9kXtvFKkBlGpOgP9if9tMCgyF9aNDPqT/poKn1zr6Q9i+/GJhmQIeRloNEkv9OVVw SIU6lBVnj+3mpZmrEu2CG1/GBfcPbYlzqRMXVCCzPDS9Pwvjej+PHVs13VmwE9X/L/by iJJEheIlA39PIP6s/xI6qKq+uB9WIbPL67Z805ifjfvlmX+/ZiH9GvFWpwv9bTPdDwEI XLPcD8VlkkGNuECejgXPWe55+G8XPCjwx8jN18sYOIjQB6P1309TPHru1p8Rci7pyfq3 dN8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g5si3513017pgm.136.2021.04.30.05.34.46; Fri, 30 Apr 2021 05:35:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbhD3MdI (ORCPT + 99 others); Fri, 30 Apr 2021 08:33:08 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:57383 "EHLO smtpout1.mo529.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbhD3MdB (ORCPT ); Fri, 30 Apr 2021 08:33:01 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.4.83]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 6B8639FA2376; Fri, 30 Apr 2021 14:32:10 +0200 (CEST) Received: from kaod.org (37.59.142.103) by DAG8EX1.mxp5.local (172.16.2.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 30 Apr 2021 14:32:09 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-103G005cdc44ea9-f93d-4031-ada4-e572ec5fe9cb, 14EB31E95D912E67FA697F35DD0A608B5C282F17) smtp.auth=groug@kaod.org X-OVh-ClientIp: 78.197.208.248 Date: Fri, 30 Apr 2021 14:32:08 +0200 From: Greg Kurz To: Vivek Goyal CC: Miklos Szeredi , , Stefan Hajnoczi , , , , Robert Krawitz Subject: Re: [PATCH v2] virtiofs: propagate sync() to file server Message-ID: <20210430143208.3d826302@bahia.lan> In-Reply-To: <20210430121757.GA1936051@redhat.com> References: <20210426151011.840459-1-groug@kaod.org> <20210427171206.GA1805363@redhat.com> <20210427210921.7b01c661@bahia.lan> <20210430121757.GA1936051@redhat.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [37.59.142.103] X-ClientProxiedBy: DAG9EX1.mxp5.local (172.16.2.81) To DAG8EX1.mxp5.local (172.16.2.71) X-Ovh-Tracer-GUID: cd2eecc2-74fb-4e7c-9c50-968357de846f X-Ovh-Tracer-Id: 17927141269092407660 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrvddviedgheegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfgjfhfogggtgfhisehtjeertdertddvnecuhfhrohhmpefirhgvghcumfhurhiiuceoghhrohhugheskhgrohgurdhorhhgqeenucggtffrrghtthgvrhhnpeefuddtieejjeevheekieeltefgleetkeetheettdeifeffvefhffelffdtfeeljeenucfkpheptddrtddrtddrtddpfeejrdehledrudegvddruddtfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepghhrohhugheskhgrohgurdhorhhgpdhrtghpthhtoheprhhlkhesrhgvughhrghtrdgtohhm Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Apr 2021 08:17:57 -0400 Vivek Goyal 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 >