Thread (29 messages) 29 messages, 6 authors, 2024-07-03

Re: [PATCH 01/10] fs: turn inode ctime fields into a single ktime_t

From: Jan Kara <jack@suse.cz>
Date: 2024-07-02 10:19:05
Also in: linux-btrfs, linux-ext4, linux-fsdevel, linux-mm, linux-nfs, linux-xfs, lkml

On Tue 02-07-24 05:56:37, Jeff Layton wrote:
On Tue, 2024-07-02 at 00:37 -0700, Christoph Hellwig wrote:
quoted
On Mon, Jul 01, 2024 at 08:22:07PM -0400, Jeff Layton wrote:
quoted
2) the filesystem has been altered (fuzzing? deliberate doctoring?).

None of these seem like legitimate use cases so I'm arguing that we
shouldn't worry about them.
Not worry seems like the wrong answer here.  Either we decide they
are legitimate enough and we preserve them, or we decide they are
bogus and refuse reading the inode.  But we'll need to consciously
deal with the case.
Is there a problem with consciously dealing with it by clamping the
time at KTIME_MAX? If I had a fs with corrupt timestamps, the last
thing I'd want is the filesystem refusing to let me at my data because
of them.
Well, you could also view it differently: If I have a fs that corrupts time
stamps, the last thing I'd like is that the kernel silently accepts it
without telling me about it :)

But more seriously, my filesystem development experience shows that if the
kernel silently tries to accept and fixup the breakage, it is nice in the
short term (no complaining users) but it tends to get ugly in the long term
(where tend people come up with nasty cases where it was wrong to fix it
up). So I think Christoph's idea of refusing to load inodes with ctimes out
of range makes sense. Or at least complain about it if nothing else (which
has some precedens in the year 2038 problem).

								Honza
-- 
Jan Kara [off-list ref]
SUSE Labs, CR
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help