[GIT PULL 20/23] xfsprogs: offline repair for parent pointers

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

 



Hi Carlos,

Please pull this branch with changes for xfsprogs for 6.10-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.

The following changes since commit 4b327cc2f5d03b772dd6d3352cbe28452cd41ef0:

man2: update ioctl_xfs_scrub_metadata.2 for parent pointers (2024-07-29 17:01:12 -0700)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/repair-pptrs-6.10_2024-07-29

for you to fetch changes up to 7ea215189a3cac45cb9323439318fcc3410727d4:

xfs_repair: wipe ondisk parent pointers when there are none (2024-07-29 17:01:13 -0700)

----------------------------------------------------------------
xfsprogs: offline repair for parent pointers [v13.8 20/28]

This series implements online checking and repair for directory parent
pointer metadata.  The checking half is fairly straightforward -- for
each outgoing directory link (forward or backwards), grab the inode at
the other end, and confirm that there's a corresponding link.  If we
can't grab an inode or lock it, we'll save that link for a slower loop
that cycles all the locks, confirms the continued existence of the link,
and rechecks the link if it's actually still there.

Repairs are a bit more involved -- for directories, we walk the entire
filesystem to rebuild the dirents from parent pointer information.
Parent pointer repairs do the same walk but rebuild the pptrs from the
dirent information, but with the added twist that it duplicates all the
xattrs so that it can use the atomic extent swapping code to commit the
repairs atomically.

This introduces an added twist to the xattr repair code -- we use dirent
hooks to detect a colliding update to the pptr data while we're not
holding the ILOCKs; if one is detected, we restart the xattr salvaging
process but this time hold all the ILOCKs until the end of the scan.

For offline repair, the phase6 directory connectivity scan generates an
index of all the expected parent pointers in the filesystem.  Then it
walks each file and compares the parent pointers attached to that file
against the index generated, and resyncs the results as necessary.

The last patch teaches xfs_scrub to report pathnames of files that are
being repaired, when possible.

This has been running on the djcloud for months with no problems.  Enjoy!

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

----------------------------------------------------------------
Darrick J. Wong (12):
xfs_db: remove some boilerplate from xfs_attr_set
xfs_db: actually report errors from libxfs_attr_set
xfs_repair: junk parent pointer attributes when filesystem doesn't support them
xfs_repair: add parent pointers when messing with /lost+found
xfs_repair: junk duplicate hashtab entries when processing sf dirents
xfs_repair: build a parent pointer index
xfs_repair: move the global dirent name store to a separate object
xfs_repair: deduplicate strings stored in string blob
xfs_repair: check parent pointers
xfs_repair: dump garbage parent pointer attributes
xfs_repair: update ondisk parent pointer records
xfs_repair: wipe ondisk parent pointers when there are none

db/attrset.c             |   36 +-
libxfs/libxfs_api_defs.h |    6 +
libxfs/xfblob.c          |    9 +
libxfs/xfblob.h          |    2 +
repair/Makefile          |    6 +
repair/attr_repair.c     |   30 ++
repair/listxattr.c       |  271 ++++++++++
repair/listxattr.h       |   15 +
repair/phase6.c          |  121 ++++-
repair/pptr.c            | 1331 ++++++++++++++++++++++++++++++++++++++++++++++
repair/pptr.h            |   17 +
repair/strblobs.c        |  211 ++++++++
repair/strblobs.h        |   24 +
13 files changed, 2069 insertions(+), 10 deletions(-)
create mode 100644 repair/listxattr.c
create mode 100644 repair/listxattr.h
create mode 100644 repair/pptr.c
create mode 100644 repair/pptr.h
create mode 100644 repair/strblobs.c
create mode 100644 repair/strblobs.h





[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