All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 1/7] xfs: fix handling of AG[IF] header buffers during scrub
@ 2022-11-17  3:09 Darrick J. Wong
  0 siblings, 0 replies; only message in thread
From: Darrick J. Wong @ 2022-11-17  3:09 UTC (permalink / raw)
  To: djwong; +Cc: dchinner, linux-xfs

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

----------------------------------------------------------------
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(-)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-17  3:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17  3:09 [GIT PULL 1/7] xfs: fix handling of AG[IF] header buffers during scrub Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.