From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 350F4C433DB for ; Tue, 12 Jan 2021 05:22:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 110A222CA1 for ; Tue, 12 Jan 2021 05:22:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388375AbhALFV6 (ORCPT ); Tue, 12 Jan 2021 00:21:58 -0500 Received: from mail104.syd.optusnet.com.au ([211.29.132.246]:44302 "EHLO mail104.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbhALFV6 (ORCPT ); Tue, 12 Jan 2021 00:21:58 -0500 Received: from dread.disaster.area (pa49-179-167-107.pa.nsw.optusnet.com.au [49.179.167.107]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 8C2BE826077; Tue, 12 Jan 2021 16:21:15 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1kzC7G-005aGL-IW; Tue, 12 Jan 2021 16:21:14 +1100 Date: Tue, 12 Jan 2021 16:21:14 +1100 From: Dave Chinner To: Eric Biggers Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Theodore Ts'o Subject: Re: [PATCH v2 04/12] fat: only specify I_DIRTY_TIME when needed in fat_update_time() Message-ID: <20210112052114.GS331610@dread.disaster.area> References: <20210109075903.208222-1-ebiggers@kernel.org> <20210109075903.208222-5-ebiggers@kernel.org> <20210111105201.GB2502@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=Ubgvt5aN c=1 sm=1 tr=0 cx=a_idp_d a=+wqVUQIkAh0lLYI+QRsciw==:117 a=+wqVUQIkAh0lLYI+QRsciw==:17 a=kj9zAlcOel0A:10 a=EmqxpYm9HcoA:10 a=7-415B0cAAAA:8 a=joOgMYZwUYIHNJ8tGMoA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Mon, Jan 11, 2021 at 11:50:27AM -0800, Eric Biggers wrote: > On Mon, Jan 11, 2021 at 11:52:01AM +0100, Christoph Hellwig wrote: > > On Fri, Jan 08, 2021 at 11:58:55PM -0800, Eric Biggers wrote: > > > + if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false)) > > > + dirty_flags |= I_DIRTY_SYNC; > > > > fat does not support i_version updates, so this bit can be skipped. > > Is that really the case? Any filesystem (including fat) can be mounted with > "iversion", which causes SB_I_VERSION to be set. That's a bug. Filesystems taht don't support persistent i_version on disk need to clear SB_I_VERSION in their mount and remount paths because the VFS iversion mount option was a complete screwup from the start. > A lot of filesystems (including fat) don't store i_version to disk, but it looks > like it will still get updated in-memory. Could anything be relying on that? If they do, then they are broken by definition. i_version as reported to observers is defined as monotonically increasing with every change to the inode. i.e. it never goes backwards. Which, of course, it will do if you crash or even just unmount/mount a filesystem that doesn't persist it. Cheers, Dave. -- Dave Chinner david@fromorbit.com