[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240717112409.i7qdiy35yxdyznng@quack3>
Date: Wed, 17 Jul 2024 13:24:09 +0200
From: Jan Kara <jack@...e.cz>
To: Jeff Layton <jlayton@...nel.org>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Chandan Babu R <chandan.babu@...cle.com>,
"Darrick J. Wong" <djwong@...nel.org>,
Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>, Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>, David Sterba <dsterba@...e.com>,
Hugh Dickins <hughd@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>,
Dave Chinner <david@...morbit.com>, Andi Kleen <ak@...ux.intel.com>,
Christoph Hellwig <hch@...radead.org>,
Uros Bizjak <ubizjak@...il.com>,
Kent Overstreet <kent.overstreet@...ux.dev>,
Arnd Bergmann <arnd@...db.de>, Randy Dunlap <rdunlap@...radead.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, linux-xfs@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-btrfs@...r.kernel.org,
linux-mm@...ck.org, linux-nfs@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH v6 4/9] fs: have setattr_copy handle multigrain
timestamps appropriately
On Mon 15-07-24 08:48:55, Jeff Layton wrote:
> The setattr codepath is still using coarse-grained timestamps, even on
> multigrain filesystems. To fix this, we need to fetch the timestamp for
> ctime updates later, at the point where the assignment occurs in
> setattr_copy.
>
> On a multigrain inode, ignore the ia_ctime in the attrs, and always
> update the ctime to the current clock value. Update the atime and mtime
> with the same value (if needed) unless they are being set to other
> specific values, a'la utimes().
>
> Note that we don't want to do this universally however, as some
> filesystems (e.g. most networked fs) want to do an explicit update
> elsewhere before updating the local inode.
>
> Reviewed-by: Darrick J. Wong <djwong@...nel.org>
> Reviewed-by: Josef Bacik <josef@...icpanda.com>
> Signed-off-by: Jeff Layton <jlayton@...nel.org>
Looks good to me so feel free to add:
Reviewed-by: Jan Kara <jack@...e.cz>
What is a bit bothering me is that it's now confusing that ATTR_MTIME_SET /
ATTR_ATIME_SET is handled in different place for mgtime and normal inodes
and I'm concerned this will bite us in the future. But not everybody is
using setattr_copy() and unifying the handling of timestamps seems like
quite some work...
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists