Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org, jack@suse.cz, lherbolt@redhat.com
Subject: Re: [PATCH 1/2] xfs: rearrange code in xfs_inode_item_precommit
Date: Fri, 19 Sep 2025 08:19:52 -0700	[thread overview]
Message-ID: <aM10mF6U4qSb1eTp@infradead.org> (raw)
In-Reply-To: <20250917222446.1329304-2-david@fromorbit.com>

On Thu, Sep 18, 2025 at 08:12:53AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> There are similar extsize checks and updates done inside and outside
> the inode item lock, which could all be done under a single top
> level logic branch outside the ili_lock. The COW extsize fixup can
> potentially miss updating the XFS_ILOG_CORE in ili_fsync_fields, so
> moving this code up above the ili_fsync_fields update could also be
> considered a fix.
> 
> Further, to make the next change a bit cleaner, move where we
> calculate the on-disk flag mask to after we attach the cluster
> buffer to the the inode log item.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
>  fs/xfs/xfs_inode_item.c | 65 ++++++++++++++++++-----------------------
>  1 file changed, 29 insertions(+), 36 deletions(-)
> 
> diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
> index afb6cadf7793..318e7c68ec72 100644
> --- a/fs/xfs/xfs_inode_item.c
> +++ b/fs/xfs/xfs_inode_item.c
> @@ -131,46 +131,28 @@ xfs_inode_item_precommit(
>  	}
>  
>  	/*
> +	 * Inode verifiers do not check that the extent size hints are an
> +	 * integer multiple of the rt extent size on a directory with
> +	 * rtinherit flags set.  If we're logging a directory that is
> +	 * misconfigured in this way, clear the bad hints.
>  	 */

Not directly related to this patch, but why are we not checking for
that in the inode verifier?  Even if we can't reject that value,
it seems like we should fix that up when reading an inode into memory
instead of in a pre-commit hook?

The patch itself looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

  parent reply	other threads:[~2025-09-19 15:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 22:12 [PATCH 0/2] xfs: reduce ILOCK contention on O_DSYNC DIO Dave Chinner
2025-09-17 22:12 ` [PATCH 1/2] xfs: rearrange code in xfs_inode_item_precommit Dave Chinner
2025-09-18 22:49   ` Darrick J. Wong
2025-09-19 15:19   ` Christoph Hellwig [this message]
2025-09-19 16:08     ` Darrick J. Wong
2025-09-22 18:12       ` Christoph Hellwig
2025-09-17 22:12 ` [PATCH 2/2] xfs: rework datasync tracking and execution Dave Chinner
2025-09-19 15:30   ` Christoph Hellwig
2025-09-23 12:12     ` Carlos Maiolino
2025-09-23 13:51 ` [PATCH 0/2] xfs: reduce ILOCK contention on O_DSYNC DIO Carlos Maiolino

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=aM10mF6U4qSb1eTp@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=jack@suse.cz \
    --cc=lherbolt@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /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