Re: Multigrain timestamps do not work on RISC-V

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux