Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp987754rwe; Thu, 25 Aug 2022 13:02:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR78bfIlk9BwGaDehVwDNZHUfJ55lEbhjyuBLmc7+LAx98kVYCXtVA5vlARBeoakB8HkjBnm X-Received: by 2002:a17:907:2722:b0:731:2aeb:7942 with SMTP id d2-20020a170907272200b007312aeb7942mr3470345ejl.734.1661457755475; Thu, 25 Aug 2022 13:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661457755; cv=none; d=google.com; s=arc-20160816; b=oLlFgGBaspMw9RA6Y2jFQHNSfy+HyIUr2IsHm9kajEwu8uEusNJmAJ5dR9VPWZG8g4 fPjz946dbsRqr8AZrFFOewTB8PKDdErFskAs0dPnGvVcZUBcfU/oP/gQz/rKchZMUT02 Dcf22+Hc5bC1cdaqMWWSbCk2pSemedw8TlRN+ufWsHsv4s0seRsXCWpCWi0EVoB0iD3h wzhmBqHWwfi3POLKVLk1ef2IET5DtdDYvFtHXfgzjtZ1D5nL+y7LHUt6AMCoabLQxLpD 0QZKvF/AKo/roCnGXd8GY8BG9/3H/zdwASe7LSayYBE/VLRUffN447k4+LUbyrsHI6jh up9w== 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=kOCHHH3BBWRwoDp6GXVRlCiiCrzA75DiQZUTmoCC3uo=; b=ZshuZ02OEA1OBX0U2P6555EZHCPylLR27FDzapQfsthtxEcEkcVKB18uOzjeRAm8xG vhOS72AsCPSoLBx1dZVF8izKx1x+oKVCfvmn1ozslaLscr2MJ2fs6caj+Ie8fgE216Pf R/u31CENS087yMnzOtZM6MjZqPqLcrTIn/QvJoM469HUvbE6pDNUfJ5rDK0HR6xsACkh 23U/6pA9t+e8en7JnNr9zeftTuTphx41diKEoufnvJaUkq/vtt02DqC6Hi7yug904TP1 lxJhRpIlAP1STo96lzwJNP2SXEx+RN/oeQ7Y3qJWr+QH11D7ecfoKZc0CO0oKQ3xpNWQ jwCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HDLiJw9O; 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 r4-20020a170906364400b0073d67160cb5si17165ejb.922.2022.08.25.13.01.35; Thu, 25 Aug 2022 13:02:35 -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=HDLiJw9O; 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 S235510AbiHYTsQ (ORCPT + 99 others); Thu, 25 Aug 2022 15:48:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233141AbiHYTsP (ORCPT ); Thu, 25 Aug 2022 15:48:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3A225F12A; Thu, 25 Aug 2022 12:48:13 -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 7612761DCF; Thu, 25 Aug 2022 19:48:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EBCBC433C1; Thu, 25 Aug 2022 19:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661456892; bh=r8gaxJKLQI+z6juVzGPZoOj4RUwyYCmoO+hFGBi7yio=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=HDLiJw9Oy8arB3LTOsdS+SDOeJbX+vBcaTADTdnfo41tdS09mjbzlWhnDnfva+x4g BjKUYzjJM0KmbD5ADf4P2NZUl6JYLFgGhIqfJv+PBq8RAZA+1zu7S79xGQXsz5M2Ci 0YEfVeZs98dFwDoUhDpoxiDLWCB/NmTFitQq9abEb6kP+l4mP3Zztwp74A3uHznlIA Nlpuue//VRmfvXJahz0JhGI6SaPXkVDjIWHKMK/6sf45SCoepMiCV91giZ2O+EJPME qaOJ0nE5cyGhIXp6sgMq5RBjvGMrBhMcHFq8rSuvQToRb3cIml8cmdtm7nY26beVcU kAw01z3J9LPeg== Message-ID: <0339f5f540010ba1bae74121d33c0643f26fefab.camel@kernel.org> Subject: Re: [PATCH] vfs: report an inode version in statx for IS_I_VERSION inodes From: Jeff Layton To: Colin Walters , Dave Chinner Cc: Al Viro , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, David Howells , Frank Filz Date: Thu, 25 Aug 2022 15:48:10 -0400 In-Reply-To: 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 Thu, 2022-08-25 at 14:48 -0400, Colin Walters wrote: >=20 > On Tue, Aug 23, 2022, at 5:53 PM, Dave Chinner wrote: > >=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 > As a userspace developer (ostree, etc. who is definitely interested in th= is functionality) I do agree with this concern; but a random drive by comme= nt: would it be helpful to expose iversion (or other bits like this from th= e vfs) via e.g. debugfs to start? I think that'd unblock writing fstests i= n the short term right? >=20 >=20 It's great to hear from userland developers who are interested in this! I don't think there is a lot of controversy about the idea of presenting a value like this via statx. The usefulness seems pretty obvious if you've ever had to deal with timestamp granularity issues. The part we're wrestling with now is that applications will need a clear (and testable!) definition of what this value means. We need to be very careful how we define this so that userland developers don't get stuck dealing with semantics that vary per fstype, while still allowing the broadest range of filesystems to support it. My current thinking is to define this such that the reported ino_version MUST change any time that the ctime would change (even if the timestamp doesn't appear to change). That should also catch mtime updates. The part I'm still conflicted about is whether we should allow for a conformant implementation to increment the value even when there is no apparent change to the inode. IOW, should this value mean that something _did_ change in the inode or that something _may_ have changed in it? Implementations that do spurious increments would less than ideal, but defining it that way might allow a broader range of filesystems to present this value. What would you prefer, as a userland developer? --=20 Jeff Layton