[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <930797ecabdfe52d698bed64c6ebed0a1235a18b.camel@kernel.org>
Date: Wed, 29 Jan 2025 18:03:38 -0500
From: Jeff Layton <jlayton@...nel.org>
To: Andreas Schwab <schwab@...e.de>, linux-riscv@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: Multigrain timestamps do not work on RISC-V
On Wed, 2025-01-29 at 11:07 +0100, Andreas Schwab wrote:
> The statx06 test in the LTP testsuite fails since the multigrain
> timestamp feature was merged:
>
> https://openqa.opensuse.org/tests/4800409#step/statx06/7
>
> The issue is that the nsec part of ctime does not change from the time
> the file is created:
>
> $ touch xx
> $ stat -c $'mtime %y\nctime %z' xx
> mtime 2025-01-29 09:43:44.677442605 +0100
> ctime 2025-01-29 09:43:44.677442605 +0100
> $ touch xx
> $ stat -c $'mtime %y\nctime %z' xx
> mtime 2025-01-29 09:43:51.641581658 +0100
> ctime 2025-01-29 09:43:51.677442605 +0100
>
> My guess would be that something in inode_set_ctime_current is going
> wrong.
>
Thanks for the bug report, Andreas.
I assume you're seeing this across different filesystems (i.e. tmpfs,
ext4, etc.)? It almost looks like this try_cmpxchg() is returning true
without actually doing the swap:
if (try_cmpxchg(&inode->i_ctime_nsec, &cur, now.tv_nsec)) {
/* If swap occurred, then we're (mostly) done */
inode->i_ctime_sec = now.tv_sec;
trace_ctime_ns_xchg(inode, cns, now.tv_nsec, cur);
mgtime_counter_inc(mg_ctime_swaps);
} else {
It might also be interesting to see the output of that tracepoint over
this test, if you're able.
Thanks,
--
Jeff Layton <jlayton@...nel.org>
Powered by blists - more mailing lists