Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3522373rwa; Tue, 23 Aug 2022 06:11:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ImrfhG+czG1pNpG/9tXXS80mIjXwQpIJWmfmOrqYbJPZKWG/QtuKWgGmt5DFISjL4TkIm X-Received: by 2002:a05:6a00:2349:b0:536:bf09:9c0a with SMTP id j9-20020a056a00234900b00536bf099c0amr7474692pfj.32.1661260303453; Tue, 23 Aug 2022 06:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661260303; cv=none; d=google.com; s=arc-20160816; b=RHl7ypvQpo1A8aS0y9o0jfrUFf0OCV+NRfCntVhVUh2PM4Z0SpONj2cIajcDUAhZeY Z/d0bcS+Kqb5sBPc7RQnJh6PVP/0HDMy+x36YCuAxXyhWyd0BIQTbjvvbvcMZDAjEgx2 t1QTuV/kN3z3eI0XpoVLHnF2dIZV8yeDKqyPxPElRiDo6W9STlKAhN0zabzCdNdZA9fy Mkv2rCTkT0WcA7CQhhi1Rf81451OTPbB4kUEYCs4f+xpVSThT6dhbdfzmBvBc6Ndiemt oIHya3xvP1lSV8DZmD1sXJ0FPxV6Hjbc9WzPO9IDxaPK1dNPR+26zsULOoICHs8m2jlE F4EA== 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:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=0e9zp8WKUjGYqm5mPMp4N3c60gCpZ/O4fuVYAMSQOs8=; b=csW6M4HRO1hbOnHMMIZ4aj3qt6pPCx8zvawCscmGrPd9Xmly7FNFEmcSTP+bfDViR9 pQP76+Ud3pnRY1R3GFt76zh83DqTxv4G+3Vym3c+VprqGi1HuuFMvLfrEO8ceK8PV87C wchQa49nMhzlz7pYtXqPPreO96AqKWthsbnFIxCgGnrVIzBM8Y+VWAFZjosGxSZ1CD3k 4MV42fruXXcUbu6RkperaQc/vY65J8qtPL0ptG0okMsb7n8Dko+4pYRj4xRaEKRlsZH+ 9+N162cPSfE3zd3Zvn4YdglE69HrvkM1hZhubfgiamgxgNU60gs644AZ2hRZwXgB4SqH 2JgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g4ynM7l7; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i184-20020a639dc1000000b0041cb4fc5adfsi15391160pgd.387.2022.08.23.06.11.13; Tue, 23 Aug 2022 06:11:43 -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=@redhat.com header.s=mimecast20190719 header.b=g4ynM7l7; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240860AbiHWM5N (ORCPT + 99 others); Tue, 23 Aug 2022 08:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240966AbiHWM44 (ORCPT ); Tue, 23 Aug 2022 08:56:56 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E390C123C8E for ; Tue, 23 Aug 2022 03:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661248885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0e9zp8WKUjGYqm5mPMp4N3c60gCpZ/O4fuVYAMSQOs8=; b=g4ynM7l71/g7UC00BdwoPh5v6X+aWHr6xNMQrQ/KXQAXrZ+luV9wmsx2I7blaCK8e9W08C OYxHqM9JgJzkVeL+cBhzZNKrn0uKra390ieZzjlzuOmsvRvdP4sC5sET7QyR7b+UtRG5t/ SZoCgaY2ua5K2JYIm5qM/x8dJ0nfI74= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-156-ZBqIdgmUNGCqbKV9pZdyiQ-1; Tue, 23 Aug 2022 06:01:22 -0400 X-MC-Unique: ZBqIdgmUNGCqbKV9pZdyiQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 30D658041BE; Tue, 23 Aug 2022 10:01:22 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24A184010D2A; Tue, 23 Aug 2022 10:01:19 +0000 (UTC) From: Florian Weimer To: Jeff Layton Cc: viro@zeniv.linux.org.uk, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, Jeff Layton , David Howells , Frank Filz Subject: Re: [PATCH] vfs: report an inode version in statx for IS_I_VERSION inodes References: <20220819115641.14744-1-jlayton@kernel.org> Date: Tue, 23 Aug 2022 12:01:18 +0200 In-Reply-To: <20220819115641.14744-1-jlayton@kernel.org> (Jeff Layton's message of "Fri, 19 Aug 2022 07:56:41 -0400") Message-ID: <87o7wb2s9d.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 * Jeff Layton: > From: Jeff Layton > > 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 its > 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. > > Claim one of the spare fields in struct statx to hold a 64-bit inode > version attribute. This value must change with any explicit, observeable > 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. > > 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. Will the version survive reboots? Is it stored on disks? Can backup tools (and others) use this to check if the file has changed since the last time the version has been observed? Thanks, Florian