public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: chandan.babu@gmail.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/3] xfs: use i_prev_unlinked to distinguish inodes that are not on the unlinked list
Date: Thu, 7 Sep 2023 16:27:27 +1000	[thread overview]
Message-ID: <ZPltT6prfr/vboeP@dread.disaster.area> (raw)
In-Reply-To: <169375775334.3323693.5974014335978928981.stgit@frogsfrogsfrogs>

On Sun, Sep 03, 2023 at 09:15:53AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Alter the definition of i_prev_unlinked slightly to make it more obvious
> when an inode with 0 link count is not part of the iunlink bucket lists
> rooted in the AGI.  This distinction is necessary because it is not
> sufficient to check inode.i_nlink to decide if an inode is on the
> unlinked list.  Updates to i_nlink can happen while holding only
> ILOCK_EXCL, but updates to an inode's position in the AGI unlinked list
> (which happen after the nlink update) requires both ILOCK_EXCL and the
> AGI buffer lock.
> 
> The next few patches will make it possible to reload an entire unlinked
> bucket list when we're walking the inode table or performing handle
> operations and need more than the ability to iget the last inode in the
> chain.
> 
> The upcoming directory repair code also needs to be able to make this
> distinction to decide if a zero link count directory should be moved to
> the orphanage or allowed to inactivate.  An upcoming enhancement to the
> online AGI fsck code will need this distinction to check and rebuild the
> AGI unlinked buckets.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  fs/xfs/xfs_icache.c |    2 +-
>  fs/xfs/xfs_inode.c  |    3 ++-
>  fs/xfs/xfs_inode.h  |   20 +++++++++++++++++++-
>  3 files changed, 22 insertions(+), 3 deletions(-)

Looks ok.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2023-09-07 15:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-03 16:15 [PATCHSET 0/3] xfs: reload entire iunlink lists Darrick J. Wong
2023-09-03 16:15 ` [PATCH 1/3] xfs: use i_prev_unlinked to distinguish inodes that are not on the unlinked list Darrick J. Wong
2023-09-07  6:27   ` Dave Chinner [this message]
2023-09-03 16:15 ` [PATCH 2/3] xfs: reload entire unlinked bucket lists Darrick J. Wong
2023-09-07  7:02   ` Dave Chinner
2023-09-07 18:30     ` Darrick J. Wong
2023-09-03 16:16 ` [PATCH 3/3] xfs: make inode unlinked bucket recovery work with quotacheck Darrick J. Wong
2023-09-05 16:33   ` [PATCH v1.1 " Darrick J. Wong
2023-09-07  7:11     ` Dave Chinner
2023-09-07 18:34       ` Darrick J. Wong
2023-09-07 21:40         ` Dave Chinner

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=ZPltT6prfr/vboeP@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=chandan.babu@gmail.com \
    --cc=djwong@kernel.org \
    --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