Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6083834rwi; Tue, 18 Oct 2022 07:58:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5pqHfxmJ+nwaz8Ih5USYw87WOkIy0pC/NpekOEYf2RaNfs0Oz4uhcv73WHU1vefeGJiAQY X-Received: by 2002:a63:d349:0:b0:460:b5ee:60ef with SMTP id u9-20020a63d349000000b00460b5ee60efmr2897120pgi.288.1666105083934; Tue, 18 Oct 2022 07:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666105083; cv=none; d=google.com; s=arc-20160816; b=mig45A+NAEZll3kj+7Gj1fEZu3YWC87GIFsEYqlmm4IC7cLtzbFJeHN26PjpIpE2cH vRmqvAIrT5qX3rAsVInH5WyVvBqfet8isV+aztbzXFOUeUppxYAis5ZgqjTznG/Dsa9V aJMrNyquHhPGPsO1sMbceRP8dlEO9oM0wheyt/53SoYcxxS3zabrKuBUJko0aMgCt5Fx eLyWgUIQbf9uo6FtMeB2jOaEECZcQtuEd6mnNuNk/NuXvII5cBjWw9epcOrID5GGcC9P 7pT7B2sh+1a+D6wR/ZlvW0olYNZdI2mdVTtBK6KlP+5BM79NVIzEp7PMu9rbpbBKLY4T 5riQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=rCYep0hQMeRHbD4rvhArVLFUCo98xB4Y3djq/xRc8fQ=; b=LPPsK7zPNJVDfAz2at25gLdemp7ZWZoSExXu8g8tsHnlwugBQFDDSAQGXpRXBFICLZ nHsGDgYvaW9pROgI3TbSEGmWTYAd+KIQfp5mbHokQkn7eoOnqr6wpNMQwrifENViqS5w +ZnacW7IG9Ph9UN1cHfKarYy/zkUmVkD74Kqexyf6bReA/mBy/OwB9cEFPgRqz3BM35i o1yQKd8mjKH3Q/2mQViwlvXum82y8cmnCtynMimcsqSWZ2LmtxA1OlPRTHGDjlzHHsJA xLFLrRJTNz0aM1wr3pomax3vawADN352JKsmq7EHTyUV/baxXS0SMuGKJobuIGRC3O0O daGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tSWyO8KM; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 32-20020a631160000000b0044ca7935603si14341063pgr.723.2022.10.18.07.57.41; Tue, 18 Oct 2022 07:58:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tSWyO8KM; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229633AbiJRO5D (ORCPT + 99 others); Tue, 18 Oct 2022 10:57:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiJRO5C (ORCPT ); Tue, 18 Oct 2022 10:57:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5F01D9960; Tue, 18 Oct 2022 07:57:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 87A2BB81F93; Tue, 18 Oct 2022 14:57:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3400BC433D6; Tue, 18 Oct 2022 14:56:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666105019; bh=qmaUREKKpKGIfPeuyHVYJiyiQ+vwR1CgcRLVNMmVems=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=tSWyO8KMO7Eo2SWIkFm8Fv/jNMSEMNYxqaBmHHVSbbPRHMjQfB2ay/FZpgWA7e39W TXzVXcbSBYKTZ5fDw6ycHeG2ZTRJPHwkt14ThiP4HYcDhErgUhpJVbQfvVaIOLU4Hj n6JpOEQlYl6uDQfd3C84PQ6Q2/jgU+2bRd5IR49wX/FwG1rqbD4l6srz8vsxOWGD+y YkcPnRVYrf6eavusnsT1t5IkuOEkCLvZbH8GxwUUSJqI3MiE7L1adVjFQjNhBTx4L4 K85dWprbcFpCdFAxFmEWOcBJIZ3Fy/WiJeAJMd+gsrfjlReJDVtqMeAgHj1faQyG4C +ZEqAplLOQp2A== Message-ID: Subject: Re: [RFC PATCH v7 9/9] vfs: expose STATX_VERSION to userland From: Jeff Layton To: Dave Chinner Cc: tytso@mit.edu, adilger.kernel@dilger.ca, djwong@kernel.org, trondmy@hammerspace.com, neilb@suse.de, viro@zeniv.linux.org.uk, zohar@linux.ibm.com, xiubli@redhat.com, chuck.lever@oracle.com, lczerner@redhat.com, jack@suse.cz, bfields@fieldses.org, brauner@kernel.org, fweimer@redhat.com, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-nfs@vger.kernel.org, linux-xfs@vger.kernel.org Date: Tue, 18 Oct 2022 10:56:55 -0400 In-Reply-To: <1e01f88bcde1b7963e504e0fd9cfb27495eb03ca.camel@kernel.org> References: <20221017105709.10830-1-jlayton@kernel.org> <20221017105709.10830-10-jlayton@kernel.org> <20221017221433.GT3600936@dread.disaster.area> <1e01f88bcde1b7963e504e0fd9cfb27495eb03ca.camel@kernel.org> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, 2022-10-18 at 06:35 -0400, Jeff Layton wrote: > On Tue, 2022-10-18 at 09:14 +1100, Dave Chinner wrote: > > On Mon, Oct 17, 2022 at 06:57:09AM -0400, Jeff Layton wrote: > > > From: Jeff Layton > > >=20 > > > Claim one of the spare fields in struct statx to hold a 64-bit inode > > > version attribute. When userland requests STATX_VERSION, copy the > > > value from the kstat struct there, and stop masking off > > > STATX_ATTR_VERSION_MONOTONIC. > >=20 > > Can we please make the name more sepcific than "version"? It's way > > too generic and - we already have userspace facing "version" fields > > for inodes that refer to the on-disk format version exposed in > > various UAPIs. It's common for UAPI structures used for file > > operations to have a "version" field that refers to the *UAPI > > structure version* rather than file metadata or data being retrieved > > from the file in question. > >=20 > > The need for an explanatory comment like this: > >=20 > > > + __u64 stx_version; /* Inode change attribute */ > >=20 > > demonstrates it is badly named. If you want it known as an inode > > change attribute, then don't name the variable "version". In > > reality, it really needs to be an opaque cookie, not something > > applications need to decode directly to make sense of. > >=20 >=20 > Fair enough. I started with this being named stx_change_attr and other > people objected. I then changed to stx_ino_version, but the "_ino" > seemed redundant. >=20 > I'm open to suggestions here. Naming things like this is hard. >=20 How about: STATX_CHANGE / statx->stx_change / STATX_ATTR_CHANGE_MONOTONIC ? --=20 Jeff Layton