Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp143905rwl; Wed, 9 Aug 2023 12:14:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFF3d5yfEnTF1cd68wXxy1jqCI9dTYmRg6KVlqT+sP3gxoH1jcCm6qQ9CzMwjm1DcvyUeXC X-Received: by 2002:aa7:d388:0:b0:523:22d9:6c39 with SMTP id x8-20020aa7d388000000b0052322d96c39mr96440edq.38.1691608487053; Wed, 09 Aug 2023 12:14:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691608487; cv=none; d=google.com; s=arc-20160816; b=m1soP0RZSNpcAuPU7VSXV/EZlXeWD5B8y3NXs3pIBTWTZFu29yubjCEEfImkWXpPSI 8aILobCuoZetrpjsMZLloiyFVEi/PxoLnSFp0OEFftzdW8avxRJvpH8013IQeUwaqy/G a4MNYE2YZ4OVsGaYrN5DL611HoAYgELGL0Jgyd55F774t1vKPxqs4tErlGUtI2lLC2jh BjRvWdiu4AtScDj7g+jPj53U9qCvu0dgbDq9N8jANh5IBc7ou36WFdWZFbbj73uN4fuV D3rqvbgIR5pTuRaAAXYZjEoLqLl6CRSoFF9gjRW08ICwSgeycMjL/3CY6k1QpjQwPlJo fxXg== 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=alXrKPD5fHXeJn9UjHKim4LKQU7HoozYjQglaZ1xXaI=; fh=D0mZnE3Vg2ym4uuJgPmxo0HvZC2Y+qumyr0BRf/YBDQ=; b=0cnp4YQru7BVl7Pnt03A2waFVh8oXJX6apKh27XQIBgizPDXOpXh0/7ZzpLIbdPLYg qxosoDu6/jrtKSsUDLu+cahNQMk0ZP9fn6pqbKO0EMrLznNrvhM4UM52Z9RyAYQO90FH gFXDLnlzysjrt3bpVQQOyv9I1rtEe2htVbjdRyHfIZ9IQ37MS7Ebb1ofFyiSqfLlQDOW a6FAeSY+cc1uJNj4MI/GzeuZ3FCFkiM0rUL72p/GTZneeSji4HDWpsxVXPnyD1wz3Msz XeiPoJ6mi1NHXF8Ff2wqQIuSFciErKEzMlyfuzwiUn3LbyZRKKiiQ1pkoqBVIEMhdJHM 1Oxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AneNvnqJ; 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 w9-20020aa7dcc9000000b005228273ab65si9548257edu.550.2023.08.09.12.14.23; Wed, 09 Aug 2023 12:14:47 -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=AneNvnqJ; 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 S231987AbjHITEw (ORCPT + 99 others); Wed, 9 Aug 2023 15:04:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229641AbjHITEw (ORCPT ); Wed, 9 Aug 2023 15:04:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 868D8E71; Wed, 9 Aug 2023 12:04:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (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 dfw.source.kernel.org (Postfix) with ESMTPS id C8AFC644A1; Wed, 9 Aug 2023 19:04:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB107C433C7; Wed, 9 Aug 2023 19:04:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691607890; bh=alXrKPD5fHXeJn9UjHKim4LKQU7HoozYjQglaZ1xXaI=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=AneNvnqJ20CJmKiEgeASfLx4NSIFXV4j2vtzAKGnX32iLsSf9A43S7wAfHVHbYQQP h3ON9dJJ2d4zasDcG0OHa5a1AfenYnO+uoesgXhOt+soOjJtmmxlhUNc5QuXKGuVOg rulv+awus9qyVEIGRttUpq9Lcin2kAZfB093o2LczBjmWrzPbu4HcAMNS3Ib4zj45p 3u7x0mQLZuZR6+lN5gsi60S8IiOPzBT4vt1n3+KsBq67CA1z2KjKobM8vv+qdWmPsN ddnXMIFOGmdQH1E3uRbvXBai78DI/EAYz+8n3M9qwxNTsQtwGjIcAPpzsM/ELjqang 5ERP9Tcme3DHA== Message-ID: Subject: Re: [PATCH v7 05/13] fat: make fat_update_time get its own timestamp From: Jeff Layton To: OGAWA Hirofumi Cc: Jan Kara , Alexander Viro , Christian Brauner , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Howells , Marc Dionne , Chris Mason , Josef Bacik , David Sterba , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Tyler Hicks , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Namjae Jeon , Sungjong Seo , Jan Kara , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , Miklos Szeredi , Bob Peterson , Andreas Gruenbacher , Greg Kroah-Hartman , Tejun Heo , Trond Myklebust , Anna Schumaker , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Mike Marshall , Martin Brandenburg , Luis Chamberlain , Kees Cook , Iurii Zaikin , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Sergey Senozhatsky , Richard Weinberger , Hans de Goede , Hugh Dickins , Andrew Morton , Amir Goldstein , "Darrick J. Wong" , Benjamin Coddington , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@telemann.coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-mtd@lists.infradead.org, linux-mm@kvack.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org Date: Wed, 09 Aug 2023 15:04:42 -0400 In-Reply-To: <87h6p86p9z.fsf@mail.parknet.co.jp> References: <20230807-mgctime-v7-0-d1dec143a704@kernel.org> <20230807-mgctime-v7-5-d1dec143a704@kernel.org> <87msz08vc7.fsf@mail.parknet.co.jp> <52bead1d6a33fec89944b96e2ec20d1ea8747a9a.camel@kernel.org> <878rak8hia.fsf@mail.parknet.co.jp> <20230809150041.452w7gucjmvjnvbg@quack3> <87v8do6y8q.fsf@mail.parknet.co.jp> <2cb998ff14ace352a9dd553e82cfa0aa92ec09ce.camel@kernel.org> <87leek6rh1.fsf@mail.parknet.co.jp> <87h6p86p9z.fsf@mail.parknet.co.jp> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) 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 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 Thu, 2023-08-10 at 03:31 +0900, OGAWA Hirofumi wrote: > Jeff Layton writes: >=20 > > On Thu, 2023-08-10 at 02:44 +0900, OGAWA Hirofumi wrote: > > > Jeff Layton writes: > > >=20 > > That would be wrong. The problem is that we're changing how update_time > > works: > >=20 > > Previously, update_time was given a timestamp and a set of S_* flags to > > indicate which fields should be updated. Now, update_time is not given = a > > timestamp. It needs to fetch it itself, but that subtly changes the > > meaning of the flags field. > >=20 > > It now means "these fields needed to be updated when I last checked". > > The timestamp and i_version may now be different from when the flags > > field was set. This means that if any of S_CTIME/S_MTIME/S_VERSION were > > set that we need to attempt to update all 3 of them. They may now be > > different from the timestamp or version that we ultimately end up with. > >=20 > > The above may look to you like it would always cause I_DIRTY_SYNC to be > > set on any ctime or mtime update, but inode_maybe_inc_iversion only > > returns true if it actually updated i_version, and it only does that if > > someone issued a ->getattr against the file since the last time it was > > updated. > >=20 > > So, this shouldn't generate any more DIRTY_SYNC updates than it did > > before. >=20 > Again, if you claim so, why generic_update_time() doesn't work same? Why > only FAT does? >=20 > Or I'm misreading generic_update_time() patch? >=20 When you say it "doesn't work the same", what do you mean, specifically? I had to make some allowances for the fact that FAT is substantially different in its timestamp handling, and I tried to preserve existing behavior as best I could. --=20 Jeff Layton