Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5746132rwb; Wed, 9 Aug 2023 08:35:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNeha5v1OsXxU2t11akIyPGxjJ8xwYvwBKiidVsktxb/oNuCbCEQbv+GomAjTfRVAxJmY2 X-Received: by 2002:a05:6a21:3297:b0:13f:c159:63ec with SMTP id yt23-20020a056a21329700b0013fc15963ecmr4593673pzb.24.1691595316945; Wed, 09 Aug 2023 08:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691595316; cv=none; d=google.com; s=arc-20160816; b=MvjeRrohYwSa3Q0cw6evN2LB7b4JrPMkWsnK4ZMXJe1bqadvjE2ji+PuCensiN8ug7 NSbctdrDFTKg+4boyybRIyBuJfJERfrPEcZfAhk7k4JUhxt4+jnwPg8e7BdwYkplbRIu PvngVRIE3s6ggxDbb3YXJPyyMF4/Iq5p64mMUqe29aA2ZrdHdZrpYkOUuW70yUNZ1LqE ZibDm2iI51BFsbrSFTgbY6YJp6vb9VXB1zzQv0J+W9URPsQQWYQrrKG8gOe0aJHjlZtN oWfxCCvYUypslLUN+5YHHBzkdtPTXgpdTSsWd3lT62DZ5WJZoI+ConknWxdwxlVsJZD7 Zgbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=T9pM1doI1agk+X2MmwPKol+CkTUFgsM83Ac97tdZe88=; fh=xsHzOkXAkgxBwCapUJo2wW/tKyzXSs16Yux39CSmD4c=; b=qdoVEBTQBSEmo+gI3qhlGpptEiruh/zs2qT6LEnDdqKVyNmoPlHeDTXf/i6vare6Xk FlSiF72LAh5gxtmJKKETou3f7Ehcu9vN0uyuh7U7wrJIpLf3DbRxrhct9tjkw+A1qKSb yZvwNn3kQ5ufycB+bd1+EE70XJdUeMzZag8h+9M/sAO6piJ/OFSmS6/GCm1dqzn2Y60w +O+dsFzeCQhWw0fJUPO0ml3YdIN/jSg/A1QJNG3oibhxOx6NAzDkw9V/xdmfftiqm0lF ULmJFIeQv+IdOpuuUHVdHImA0xUXgJ2doigINGexgZyJgScKdY+awI2dQgB1a9xAOe4S 1bUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="PhVUi/uO"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=cqqb6K6i; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca20-20020a056a02069400b00565307ee53bsi2262406pgb.439.2023.08.09.08.35.04; Wed, 09 Aug 2023 08:35:16 -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=@suse.cz header.s=susede2_rsa header.b="PhVUi/uO"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=cqqb6K6i; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233487AbjHIPAp (ORCPT + 99 others); Wed, 9 Aug 2023 11:00:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233040AbjHIPAn (ORCPT ); Wed, 9 Aug 2023 11:00:43 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E61B41FF5; Wed, 9 Aug 2023 08:00:42 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A40162183F; Wed, 9 Aug 2023 15:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1691593241; h=from:from:reply-to: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=T9pM1doI1agk+X2MmwPKol+CkTUFgsM83Ac97tdZe88=; b=PhVUi/uOUAMtA9N5d0/Cfyd7ajz4cp2kJoUJhaQu6DDg/4ZBR2ulD5NnnIutb+RvTgOhZu va3jLTw2VLniHCcL7mPa8wCZF+q+F4znEx4s9wuxLkAbwAMW1TTsE6/P2XRHAKC2zla6BB rR1DtgPeT6Q9ikUt3HY3IlDOz+sGSpQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1691593241; h=from:from:reply-to: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=T9pM1doI1agk+X2MmwPKol+CkTUFgsM83Ac97tdZe88=; b=cqqb6K6iG6a7Y6ZZq2rzMwz1c5y090ilDlyL/8hMS5IblOhw3I1NrjIjlnRdaQl5+/nifI AlcMBSfF0kUhaGAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 858EE13251; Wed, 9 Aug 2023 15:00:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id TWyOIBmq02RvPAAAMHmgww (envelope-from ); Wed, 09 Aug 2023 15:00:41 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 1BAC9A0769; Wed, 9 Aug 2023 17:00:41 +0200 (CEST) Date: Wed, 9 Aug 2023 17:00:41 +0200 From: Jan Kara To: OGAWA Hirofumi Cc: Jeff Layton , 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 Subject: Re: [PATCH v7 05/13] fat: make fat_update_time get its own timestamp Message-ID: <20230809150041.452w7gucjmvjnvbg@quack3> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878rak8hia.fsf@mail.parknet.co.jp> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 Wed 09-08-23 22:36:29, OGAWA Hirofumi wrote: > Jeff Layton writes: > > > On Wed, 2023-08-09 at 17:37 +0900, OGAWA Hirofumi wrote: > >> Jeff Layton writes: > >> > >> > Also, it may be that things have changed by the time we get to calling > >> > fat_update_time after checking inode_needs_update_time. Ensure that we > >> > attempt the i_version bump if any of the S_* flags besides S_ATIME are > >> > set. > >> > >> I'm not sure what it meaning though, this is from > >> generic_update_time(). Are you going to change generic_update_time() > >> too? If so, it doesn't break lazytime feature? > >> > > > > Yes. generic_update_time is also being changed in a similar fashion. > > This shouldn't break the lazytime feature: lazytime is all about how and > > when timestamps get written to disk. This work is all about which > > clocksource the timestamps originally come from. > > I can only find the following update in this series, another series > updates generic_update_time()? The patch updates only if S_VERSION is > set. > > Your fat patch sets I_DIRTY_SYNC always instead of I_DIRTY_TIME. When I > last time checked lazytime, and it was depending on I_DIRTY_TIME. > > Are you sure it doesn't break lazytime? I'm totally confusing, and > really similar with generic_update_time()? Since you are talking past one another with Jeff let me chime in here :). I think you are worried about this hunk: - if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false)) + if ((flags & (S_VERSION|S_CTIME|S_MTIME)) && inode_maybe_inc_iversion(inode, false)) dirty_flags |= I_DIRTY_SYNC; which makes the 'flags' test pass even if we just modified ctime or mtime. But do note the second part of the if - inode_maybe_inc_iversion() - so we are going to mark the inode dirty with I_DIRTY_SYNC only if someone queried iversion since the last time we have incremented it. So this hunk is not really changing how inode is marked dirty, it only changes how often we check whether iversion needs increment and that should be fine (and desirable). Hence lazytime isn't really broken by this in any way. Honza -- Jan Kara SUSE Labs, CR