From patchwork Fri Aug 5 18:35:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 1664166 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=lGCbyajA; dkim-atps=neutral Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LzvRw21k4z9sGR for ; Sat, 6 Aug 2022 04:35:56 +1000 (AEST) Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4LzvRv6MQHz4x1c for ; Sat, 6 Aug 2022 04:35:55 +1000 (AEST) Received: by gandalf.ozlabs.org (Postfix) id 4LzvRv6KRyz4x2c; Sat, 6 Aug 2022 04:35:55 +1000 (AEST) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: gandalf.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=lGCbyajA; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4LzvRv6FrRz4x1c for ; Sat, 6 Aug 2022 04:35:55 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241428AbiHESfu (ORCPT ); Fri, 5 Aug 2022 14:35:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241130AbiHESft (ORCPT ); Fri, 5 Aug 2022 14:35:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA8E9765E; Fri, 5 Aug 2022 11:35:48 -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 66EAEB80D83; Fri, 5 Aug 2022 18:35:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E91FC433D6; Fri, 5 Aug 2022 18:35:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659724546; bh=0nXuhjdJNF9HU4zM6ykQuL5s8Oky62WY1qkxmt9LyPg=; h=From:To:Cc:Subject:Date:From; b=lGCbyajAonhHywdyKx4A4xVUbXE6QpFYgWo1K1jBW9mZOSGz9j+yy7RMJttRLu5v7 vZeYpF40ZRBQnGviqeHrXhX5prfwnhpKh9gx8h1cAWn/YAfwteNd8AUB2aaV81uQaG NUmc/zHpVmHxwyCgfX+jKfV1kK1nfUc0L/jbSu93a+qUOZmTG3NyEtCUyEu2KuXhqf NIiiwnLFRhsQ334bAuZ4BuI9ybLGRN5u5AN9YNQ7xQ3AfdN69hIw878y8lZSgs3pAm lLyp6L6pXHcM8mQwYM9oGjkFrlSg8LcoK4VvwPyk0gRX8vAju5/x8W95jWApO0loh1 iyePi98+oobMw== From: Jeff Layton To: linux-fsdevel@vger.kernel.org Cc: dhowells@redhat.com, lczerner@redhat.com, bxue@redhat.com, ceph-devel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-afs@lists.infradead.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: [RFC PATCH 0/4] vfs: allow querying i_version via statx Date: Fri, 5 Aug 2022 14:35:39 -0400 Message-Id: <20220805183543.274352-1-jlayton@kernel.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.7 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-ext4@vger.kernel.org Recently I posted a patch to turn on the i_version counter unconditionally in ext4, and Lukas rightly pointed out that we don't currently have an easy way to validate its functionality. You can fetch it via NFS (and see it in network traces), but there's no way to get to it from userland. Besides testing, this may also be of use for userland NFS servers, or by any program that wants to accurately check for file changes, and not be subject to mtime granularity problems. Comments and suggestions welcome. I'm not 100% convinced that this is a great idea, but we've had people ask for it before and it seems like a reasonable thing to provide. Jeff Layton (4): vfs: report change attribute in statx for IS_I_VERSION inodes nfs: report the change attribute if requested afs: fill out change attribute in statx replies ceph: fill in the change attribute in statx requests fs/afs/inode.c | 2 ++ fs/ceph/inode.c | 14 +++++++++----- fs/nfs/inode.c | 3 +++ fs/stat.c | 7 +++++++ include/linux/stat.h | 1 + include/uapi/linux/stat.h | 3 ++- samples/vfs/test-statx.c | 4 +++- 7 files changed, 27 insertions(+), 7 deletions(-)