[GIT PULL 1/7] xfs: fix handling of AG[IF] header buffers during scrub

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

 



Hi Darrick,

Please pull this branch with changes for xfs for 6.2-rc1.

As usual, I did a test-merge with the main upstream branch as of a few
minutes ago, and didn't see any conflicts.  Please let me know if you
encounter any problems.

--D

The following changes since commit f0c4d9fc9cc9462659728d168387191387e903cc:

Linux 6.1-rc4 (2022-11-06 15:07:11 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-fix-ag-header-handling-6.2_2022-11-16

for you to fetch changes up to b255fab0f80cc65a334fcd90cd278673cddbc988:

xfs: make AGFL repair function avoid crosslinked blocks (2022-11-16 15:25:01 -0800)

----------------------------------------------------------------
xfs: fix handling of AG[IF] header buffers during scrub

While reading through the online fsck code, I noticed that the setup
code for AG metadata scrubs will attach the AGI, the AGF, and the AGFL
buffers to the transaction.  It isn't necessary to hold the AGFL buffer,
since any code that wants to do anything with the AGFL will need to hold
the AGF to know which parts of the AGFL are active.  Therefore, we only
need to hold the AGFL when scrubbing the AGFL itself.

The second bug fixed by this patchset is one that I observed while
testing online repair.  When a buffer is held across a transaction roll,
its buffer log item will be detached if the bli was clean before the
roll.  If we are holding the AG headers to maintain a lock on an AG, we
then need to set the buffer type on the new bli to avoid confusing the
logging code later.

There's also a bug fix for uninitialized memory in the directory scanner
that didn't fit anywhere else.

Ths patchset finishes off by teaching the AGFL repair function to look
for and discard crosslinked blocks instead of putting them back on the
AGFL.

v23.2: Log the buffers before rolling the transaction to keep the moving
forward in the log and avoid the bli falling off.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>

----------------------------------------------------------------
Darrick J. Wong (4):
xfs: fully initialize xfs_da_args in xchk_directory_blocks
xfs: don't track the AGFL buffer in the scrub AG context
xfs: log the AGI/AGF buffers when rolling transactions during an AG repair
xfs: make AGFL repair function avoid crosslinked blocks

fs/xfs/scrub/agheader.c        | 47 +++++++++++++++----------
fs/xfs/scrub/agheader_repair.c | 79 +++++++++++++++++++++++++++++++++++-------
fs/xfs/scrub/common.c          |  8 -----
fs/xfs/scrub/dir.c             | 10 +++---
fs/xfs/scrub/repair.c          | 41 ++++++++++++++--------
fs/xfs/scrub/scrub.h           |  1 -
6 files changed, 128 insertions(+), 58 deletions(-)



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux