Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp5195514rwn; Mon, 12 Sep 2022 06:00:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR4x665647gdy2C43QZZS6zeG/HOBiN69SXo75GH8ZK/iSxUK0RnoQSd+KLcsFKH6Q2xf7bU X-Received: by 2002:a05:6402:10cc:b0:446:491f:d6dd with SMTP id p12-20020a05640210cc00b00446491fd6ddmr21864478edu.360.1662987604912; Mon, 12 Sep 2022 06:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662987604; cv=none; d=google.com; s=arc-20160816; b=BiRnZiIODNOo/Dn//FlXm6xdCADq0VRyPiQv68HYltSsp5zYvvwzHdNoV38RbzHEuq 5s4wYLh2wm4URnLOiINBgiyVsJ6bn2gVoLAvMyjC2wOpmTQxbtNDhhomtPMaRdx0XNQG TRjXChqb2px9wybimMQFbJwiGIK/5drpWjvHjg3Y+tl7jKb9GJePUkPZ5NJotpHSu8Id wgJCx7oeDfdVpqIZogNQ4jJ+hu3XWp3bcSaZrwIVQ1g2mltCF5lIRwYqu42G6K4lEOFS vXeKNg5kiDy0F4kNFEbj6H+nn4XuMz9ZD5rnTRErlVpiOFQvJpp5RiDmHawuMwIFbCF0 i5qA== 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=HAduXXPvU/bDrMOMeA22h+1WymdSAT5Av6gltbRAZOM=; b=0oWRmkGUUnrMt9/A3zD80O5feGGeCEqw5xFhT32yDHDqNpxvXNDkpVxh821hQ4rhby a/6/oppkxU9OzcEgF3OdGhNw32utR0e3QqfEYqsKXYK/wVQcB6nIAWe+kAiKPJI1baYm e7Cd4JJi5AxmveqqukDquoeYX6xTEtvndfIS3vfS7n2RZ6+sEZDhaY2OTeiZusI3Kthn AD8KMV+Pk1yntj8GQekC4GA5gibR/OWj2dM4TAXJ2/lJAdDTmzcKA2SPtJ5XTCI2CTMa VZdP7rChEkPWzz0I0fhsJZ75/mATdp0Pscgt5Fe8ca7L86q+7T932UI5Fksv4jRrFjlU Llzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="awlRC/ah"; 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 sb37-20020a1709076da500b00730fdb36019si7065637ejc.21.2022.09.12.05.59.39; Mon, 12 Sep 2022 06:00:04 -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="awlRC/ah"; 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 S229544AbiILM7g (ORCPT + 99 others); Mon, 12 Sep 2022 08:59:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbiILM7f (ORCPT ); Mon, 12 Sep 2022 08:59:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF7B6C7F; Mon, 12 Sep 2022 05:59:31 -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 80C6DB80B21; Mon, 12 Sep 2022 12:59:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 174FEC433D6; Mon, 12 Sep 2022 12:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662987569; bh=pHJ7AkTbTBW4OmGY68+VWU0dmsFeRL0c8rCpvJCVi+U=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=awlRC/ah/zOC3/n+4eKeP0zjpI/WLVz/QauQ7KH+wgSAZU11j8fFn0sJybstsAvVl L2TnyK8D1aWG0V1G44z4i34wM7a/3QMmrzwbsGYRdDkYpyrJy4jUM3yg7HFR14syod Hnv3cHu8vB6P46n0MU/Mnw8BfBnME+kD/IC5b05z9OQy0c8oDjbprW+rd4u2QLGIn3 Ixy8kWYpLTa8B9xvh9LtEzS+u8PJHo7m9N39pEcxtStd5lorIsi3HX5ALJOh1eCvwk Lz+MtgwtaJcGb4CyO9t2EctV9/mK93ip0f+QLCx7mI6q1txn8BXJyCnEb6ZJHuPXbN GxX6wdqFh/Fpw== Message-ID: <9d6052680b2a86bee7f016401e1a06a63ec35cc1.camel@kernel.org> Subject: Re: [man-pages RFC PATCH v4] statx, inode: document the new STATX_INO_VERSION field From: Jeff Layton To: "J. Bruce Fields" Cc: Theodore Ts'o , Jan Kara , NeilBrown , adilger.kernel@dilger.ca, djwong@kernel.org, david@fromorbit.com, trondmy@hammerspace.com, viro@zeniv.linux.org.uk, zohar@linux.ibm.com, xiubli@redhat.com, chuck.lever@oracle.com, lczerner@redhat.com, brauner@kernel.org, fweimer@redhat.com, linux-man@vger.kernel.org, linux-api@vger.kernel.org, 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: Mon, 12 Sep 2022 08:59:25 -0400 In-Reply-To: <20220912125425.GA9304@fieldses.org> References: <02928a8c5718590bea5739b13d6b6ebe66cac577.camel@kernel.org> <20220908155605.GD8951@fieldses.org> <9e06c506fd6b3e3118da0ec24276e85ea3ee45a1.camel@kernel.org> <20220908182252.GA18939@fieldses.org> <44efe219dbf511492b21a653905448d43d0f3363.camel@kernel.org> <20220909154506.GB5674@fieldses.org> <125df688dbebaf06478b0911e76e228e910b04b3.camel@kernel.org> <20220910145600.GA347@fieldses.org> <9eaed9a47d1aef11fee95f0079e302bc776bc7ff.camel@kernel.org> <20220912125425.GA9304@fieldses.org> 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-ext4@vger.kernel.org On Mon, 2022-09-12 at 08:54 -0400, J. Bruce Fields wrote: > On Mon, Sep 12, 2022 at 07:42:16AM -0400, Jeff Layton wrote: > > A scheme like that could work. It might be hard to do it without a > > spinlock or something, but maybe that's ok. Thinking more about how we'= d > > implement this in the underlying filesystems: > >=20 > > To do this we'd need 2 64-bit fields in the on-disk and in-memory=20 > > superblocks for ext4, xfs and btrfs. On the first mount after a crash, > > the filesystem would need to bump s_version_max by the significant > > increment (2^40 bits or whatever). On a "clean" mount, it wouldn't need > > to do that. > >=20 > > Would there be a way to ensure that the new s_version_max value has mad= e > > it to disk? Bumping it by a large value and hoping for the best might b= e > > ok for most cases, but there are always outliers, so it might be > > worthwhile to make an i_version increment wait on that if necessary.= =20 >=20 > I was imagining that when you recognize you're getting close, you kick > off something which writes s_version_max+2^40 to disk, and then updates > s_version_max to that new value on success of the write. >=20 Ok, that makes sense. > The code that increments i_version checks to make sure it wouldn't > exceed s_version_max. If it would, something has gone wrong--a write > has failed or taken a long time--so it waits or errors out or something, > depending on desired filesystem behavior in that case. >=20 Maybe could just throw a big scary pr_warn too? I'd have to think about how we'd want to handle this case. > No locking required in the normal case? Yeah, maybe not. --=20 Jeff Layton