Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2974682pxb; Tue, 12 Jan 2021 03:19:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuP4QyUmHl8DcZvhg0ZV3r7Zk7e8zt7kGXbjsRAJl2+aXnnVcOKawyLdUedoz8W5I0qk/A X-Received: by 2002:a05:6402:1d9a:: with SMTP id dk26mr2959937edb.283.1610450350012; Tue, 12 Jan 2021 03:19:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610450350; cv=none; d=google.com; s=arc-20160816; b=bOVzDg8SqQBDUZkKrX04w1ytsOciYCdDd7tav2lveGaryAXLmazAN8ktCGdDL/6oKx lBLVq9qPKX6+3/ZOfjBuBXTQPE1oSXJ9/cmSaqqKxScxIqkCMQisFFrbJKDWaWaxv3w1 ovVrphZGOJBQMVKs5TU+piaeRTe+ZtnL6FdpV3cegCQnrv94Xz1cRvQq6E00JFOsP7rN 6KiMiTZzOtKMBh/9nnDqdBGxwRDkpMpMnceAfAX/dIZwUzJ8FWD3zuMZXP2NSJ5K9q/G G4bxj0SgyeXLDVaXYIdBpr5+SgzdpCDkBumAolOuUQkvn5Z9memLqeYOW6ywQcZGX/03 oX1A== 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; bh=CGAqWqlaxWjocJQqXZ6l5IvsBY8vVAuCi4hJf+54fOQ=; b=C/cuj6dCq8574m/+8F1PMcZI3ryKmvDF5f1AhWVyDkcJ0uKVFjDKyvL4lvIJywNSYW EpWGSCugDF/v+t8eWJYbqaMjFw4YeqKHCokqhE3SJqXiUocTUpBBm6gy6Nn9yDngOzlZ /fgX0hr1BBVeEZ8aseXvzW6uv6Li6CDEn1MLMadvshkSMIuOVxKnSBe5enXLz0WImFyP 3Zs0zq4warb6khHI6hIBPMbTmcq6qdq+agWNLY8RGDw5R3O1rTtGhahyEFlyU05PbKEr ZgsjXVaQkCsy49yO762gEmdnqJGB1Hk+Vvg7A/q7x90WNWPOHhzIlvs/soZsAHEGtqSo jlaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u21si1020559ejo.496.2021.01.12.03.18.46; Tue, 12 Jan 2021 03:19:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388374AbhALFV6 (ORCPT + 99 others); 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-ext4@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