Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp416636rwe; Wed, 24 Aug 2022 03:20:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR7z0EUkWXrcqS0xX9KYPFXfl94hSIaJ3Tb8CnC6ijmHrg8mvQE+zcs9+adwk22Zow+Dny2Y X-Received: by 2002:a17:907:8a01:b0:731:4316:b0ad with SMTP id sc1-20020a1709078a0100b007314316b0admr2531871ejc.477.1661336404686; Wed, 24 Aug 2022 03:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661336404; cv=none; d=google.com; s=arc-20160816; b=cc4vNvJUtccNTTFiFOyfbUeLoYFRBapg0lPz38iAY1EuYGvR+DfAzhJhUPaftjuvnx oIGEGiSFAbNrDU0++xTqlHg6q4m9blq2NE18EjxUrn1ayV54UDz28p0rrcE/z1Ej+0y0 0hNUOs17pV7yFI6pmbXX5oyerN2ONo6dMb7Syf3ioPHbxCNWaDovzShOgNQ+KJ+8q2hl Sf5k2ketxPD4rZ/EGCeuCK6iAK2QMlbBn1s5OKcBtuRBQ9RZIlxRiG8K5WhK3gIt9lG9 TRD0kzjmGO0OkyP6LV8I2gNvyo8K2OVubMtj05sXxkfSsl77obAvS1HcVBUpOU3k3pLG 6QNw== 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=Q/sJyEIBeFaiOK2DLVudYTgdQk3CzzSDuKuPyWzoMfA=; b=GdQsoub5/7iS2j8lOxYbKkpCo303w0NJBNzWiHWFyfK2SQsXGfNRSWp7fP/KVlzHIm 9XkTuerFTbxTKPoOeibpjpXAJtOvn+jMf/GORyZkjDyu++Ho28B9uXg/m0B2AbewVgWA OG4vAY39qjaIBHa7scdgUpCEE9kvLya8RG8jBUotJcgZh9KOu8aqmq92t3P7xyBDFc1Q h6OTyZNOXTwm6OZTttEGsht+chpW+4KrDwGS6nxbIqe0r+XOpM0HUHi0nb9SUqcKxCbE m/r3A1N+CYDQNKNNJPjOP7Jy5R3RrInqHWwG3/ydaBDcO0lBTTli10rFsFKHdFWOmS0b gFvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Ty2H/OJj"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 r20-20020a50c014000000b0043be2131ffdsi3741531edb.46.2022.08.24.03.19.38; Wed, 24 Aug 2022 03:20:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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="Ty2H/OJj"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 S236389AbiHXKR0 (ORCPT + 99 others); Wed, 24 Aug 2022 06:17:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231846AbiHXKRZ (ORCPT ); Wed, 24 Aug 2022 06:17:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E19072ECD; Wed, 24 Aug 2022 03:17:24 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 9966F618C9; Wed, 24 Aug 2022 10:17:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B228C433C1; Wed, 24 Aug 2022 10:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661336244; bh=Q/sJyEIBeFaiOK2DLVudYTgdQk3CzzSDuKuPyWzoMfA=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Ty2H/OJjltsYMMYRlq8ferSZILE2V/1ku703OF1EGmXBIY88vJ3YChurbN8Sndb2s RYedY5SvWseSldIgp7gKvIDiT0pYfXFLSK+IdjYkxmVTah4lOwt4aqj5P/QviduCtX YqKWkvRkJMSXspsGwS5Nk/nzrc7VyVs0brHNjQ8ps9SCxYkxOvQN5TQooTUIvWEEqf WgWOUO1kgp2QJHW4uF74AMbb8yfjVVH0307sw37+vUIR29L/xHsLwERTwT6Vc8Y2CF TCXXbY42hfHUcnUXPnli5k2hiscx2MwVWXOf+Tlrshc8ZpKjn52gGlqI8wNf5oubKp RzKdmNbpZW/+w== Message-ID: <7901f60f7ea67d757caa5ba26588f01f308caaac.camel@kernel.org> Subject: Re: [PATCH] vfs: report an inode version in statx for IS_I_VERSION inodes From: Jeff Layton To: Dave Chinner Cc: viro@zeniv.linux.org.uk, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, David Howells , Frank Filz Date: Wed, 24 Aug 2022 06:17:22 -0400 In-Reply-To: <20220823215333.GC3144495@dread.disaster.area> References: <20220819115641.14744-1-jlayton@kernel.org> <20220823215333.GC3144495@dread.disaster.area> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 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,T_SCC_BODY_TEXT_LINE 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-nfs@vger.kernel.org On Wed, 2022-08-24 at 07:53 +1000, Dave Chinner wrote: > On Fri, Aug 19, 2022 at 07:56:41AM -0400, Jeff Layton wrote: > > From: Jeff Layton > >=20 > > The NFS server and IMA both rely heavily on the i_version counter, but > > it's largely invisible to userland, which makes it difficult to test it= s > > behavior. This value would also be of use to userland NFS servers, and > > other applications that want a reliable way to know if there was an > > explicit change to an inode since they last checked. > >=20 > > Claim one of the spare fields in struct statx to hold a 64-bit inode > > version attribute. This value must change with any explicit, observeabl= e > > metadata or data change. Note that atime updates are excluded from this= , > > unless it is due to an explicit change via utimes or similar mechanism. > >=20 > > When statx requests this attribute on an IS_I_VERSION inode, do an > > inode_query_iversion and fill the result in the field. Also, update the > > test-statx.c program to display the inode version and the mountid. > >=20 > > Cc: David Howells > > Cc: Frank Filz > > Signed-off-by: Jeff Layton >=20 > NAK. >=20 > THere's no definition of what consitutes an "inode change" and this > exposes internal filesystem implementation details (i.e. on disk > format behaviour) directly to userspace. That means when the > internal filesystem behaviour changes, userspace applications will > see changes in stat->ino_version changes and potentially break them. >=20 > We *need a documented specification* for the behaviour we are exposing to > userspace here, and then individual filesystems needs to opt into > providing this information as they are modified to conform to the > behaviour we are exposing directly to userspsace. >=20 > Jeff - can you please stop posting iversion patches to different > subsystems as individual, unrelated patchsets and start posting all > the changes - statx, ext4, xfs, man pages, etc as a single patchset > so the discussion can be centralised in one place and not spread > over half a dozen disconnected threads? >=20 Sure. Give me a few days and I'll post a more coherent set of patches. Thanks, --=20 Jeff Layton