Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Christoph Hellwig <hch@lst.de>, Pankaj Raghav <pankaj.raghav@linux.dev>
Cc: Andres Freund <andres@anarazel.de>,
	linux-xfs@vger.kernel.org, Carlos Maiolino <cem@kernel.org>,
	Christian Brauner <brauner@kernel.org>,
	gost.dev@samsung.com, 	p.raghav@samsung.com
Subject: Re: Increase in XFS journal flushes with (direct_write;fdatasync)+
Date: Fri, 08 May 2026 07:42:06 -0400	[thread overview]
Message-ID: <08a84b78e83a61b7dd661df32ac31d87b98ccc9c.camel@kernel.org> (raw)
In-Reply-To: <20260508084346.GA19951@lst.de>

On Fri, 2026-05-08 at 10:43 +0200, Christoph Hellwig wrote:
> On Fri, May 08, 2026 at 10:29:38AM +0200, Pankaj Raghav wrote:
> >                 } else {
> > -                       if (inode_maybe_inc_iversion(inode, !!dirty))
> > +                       /*
> > +                        * Don't force iversion increment for pure lazytime
> > +                        * updates (when dirty is set to I_DIRTY_TIME only).
> > +                        */
> > +                       if (inode_maybe_inc_iversion(inode,
> > +                                                    dirty != I_DIRTY_TIME))
> >                                 dirty |= I_DIRTY_SYNC;
> >                 }
> >         }
> > 
> > If you are tests are passing, then I can send a fix as a separate patch.
> 
> The comment needs to explain the why and not the how.   AFAICS the
> why is that lazytime is not propagated to the disk at this mount,
> so incrementing i_version should not happen, but I'm adding Jeff
> for insights.
> 
> 

That looks correct to me. I think the logic here is:

If we're going to disk anyway, then we might as well force an i_version
update. In the case where we're not (dirty == I_DIRTY_TIME), then we
only want to do an i_version update if someone has queried it. If an
i_version update does occur, then we need to go to disk by setting
I_DIRTY_SYNC.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2026-05-08 11:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <IS8F8EYS5pW4UU5a3jxOTy-f18EgkDa_2zAUswRgTm6NVtvmajAaQyu9CDxkTelDnfXfCl7L_692C77zRAxwFQ==@protonmail.internalid>
2026-05-06 13:26 ` Increase in XFS journal flushes with (direct_write;fdatasync)+ Andres Freund
2026-05-06 15:05   ` Carlos Maiolino
2026-05-07 20:34   ` Pankaj Raghav (Samsung)
2026-05-08  8:10     ` Christoph Hellwig
2026-05-08  8:29       ` Pankaj Raghav
2026-05-08  8:43         ` Christoph Hellwig
2026-05-08 11:42           ` Jeff Layton [this message]
2026-05-08 11:47             ` Pankaj Raghav
2026-05-11  8:56               ` Christoph Hellwig
2026-05-11 10:31                 ` Pankaj Raghav

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=08a84b78e83a61b7dd661df32ac31d87b98ccc9c.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=andres@anarazel.de \
    --cc=brauner@kernel.org \
    --cc=cem@kernel.org \
    --cc=gost.dev@samsung.com \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=p.raghav@samsung.com \
    --cc=pankaj.raghav@linux.dev \
    /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