linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Andreas Schwab <schwab@suse.de>, linux-riscv@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: Multigrain timestamps do not work on RISC-V
Date: Wed, 29 Jan 2025 18:03:38 -0500	[thread overview]
Message-ID: <930797ecabdfe52d698bed64c6ebed0a1235a18b.camel@kernel.org> (raw)
In-Reply-To: <mvmv7ty3pd8.fsf@suse.de>

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@kernel.org>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

      parent reply	other threads:[~2025-01-29 23:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29 10:07 Multigrain timestamps do not work on RISC-V Andreas Schwab
2025-01-29 17:20 ` Andreas Schwab
2025-01-29 23:06   ` Jeff Layton
2025-01-29 23:28     ` Jeff Layton
2025-01-30  9:29       ` Andreas Schwab
2025-01-29 23:03 ` Jeff Layton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=930797ecabdfe52d698bed64c6ebed0a1235a18b.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).