Skip to contentSkip to conversation

: xfsprogs: everything I have for 6.14

GIT PULLBOMB Darrick J. Wong 1 participant 8 messages Feb 25, 2025

lore
Share & tools
lore
#0 lore raw

Hi Andrey,

Please pull all this new code for xfsprogs 6.14. The big highlights here are adding rt rmap and reflink support to the userspace tooling, a new xfs_db command to extract directory trees from a dead/unsupported filesystem, and various xfs_scrub fixes.

--D

#1 lore raw

[GIT PULL 1/7] xfsprogs: random bug fixes

Hi Andrey,

Please pull this branch with changes for xfsprogs for 6.14-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 4fd999332e19993fb7fd381f5fcd40ff943d98ac:

xfsprogs: Release v6.13.0 (2025-02-13 11:28:27 +0100)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/random-fixes-6.14_2025-02-25

for you to fetch changes up to c1963d498ad2612203d83fd7f2d1fb88a4a63eb2:

libxfs: mark xmbuf_{un,}map_page static (2025-02-25 09:15:56 -0800)

----------------------------------------------------------------
xfsprogs: random bug fixes [1/7]

Here's a pile of assorted bug fixes from around the codebase.

With a bit of luck, this should all go splendidly.

----------------------------------------------------------------
Christoph Hellwig (1):
libxfs: mark xmbuf_{un,}map_page static

Darrick J. Wong (3):
mkfs,xfs_repair: don't pass a daddr as the flags argument
xfs_db: obfuscate rt superblock label when metadumping
libxfs: unmap xmbuf pages to avoid disaster

include/cache.h  |   6 +++
libxfs/buf_mem.h |   3 --
db/metadump.c    |  11 ++++
libxfs/buf_mem.c | 159 ++++++++++++++++++++++++++++++++++++++++++++-----------
libxfs/cache.c   |  11 ++++
mkfs/xfs_mkfs.c  |   3 +-
repair/rt.c      |   2 +-
7 files changed, 157 insertions(+), 38 deletions(-)
#2 lore raw

[GIT PULL 2/7] xfs_scrub: fixes and cleanups for inode iteration

In reply to Darrick J. Wong

Hi Andrey,

Please pull this branch with changes for xfsprogs for 6.14-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 c1963d498ad2612203d83fd7f2d1fb88a4a63eb2:

libxfs: mark xmbuf_{un,}map_page static (2025-02-25 09:15:56 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-inode-iteration-fixes-6.14_2025-02-25

for you to fetch changes up to 7ae92e1cb0aeeb333ac38393a5b3dbcda1ac769e:

xfs_scrub: try harder to fill the bulkstat array with bulkstat() (2025-02-25 09:15:57 -0800)

----------------------------------------------------------------
xfs_scrub: fixes and cleanups for inode iteration [2/7]

Christoph and I were investigating some performance problems in xfs_scrub on filesystems that have a lot of rtgroups, and we noticed several problems and inefficiencies in the existing inode iteration code.

The first observation is that two of the three callers of scrub_all_inodes (phases 5 and 6) just want to walk all the user files in the filesystem. They don't care about metadir directories, and they don't care about matching inumbers data to bulkstat data for the purpose of finding broken files. The third caller (phase 3) does, so it makes more sense to create a much simpler iterator for phase 5 and 6 that only calls bulkstat.

But then I started noticing other problems in the phase 3 inode iteration code -- if the per-inumbers bulkstat iterator races with other threads that are creating or deleting files we can walk off the end of the bulkstat array, we can miss newly allocated files, miss old allocated inodes if there are newly allocated ones, pointlessly try to scan deleted files, and redundantly scan files from another inobt record.

These races rarely happen, but they all need fixing.

With a bit of luck, this should all go splendidly.

----------------------------------------------------------------
Darrick J. Wong (15):
man: document new XFS_BULK_IREQ_METADIR flag to bulkstat
libfrog: wrap handle construction code
xfs_scrub: don't report data loss in unlinked inodes twice
xfs_scrub: call bulkstat directly if we're only scanning user files
xfs_scrub: remove flags argument from scrub_scan_all_inodes
xfs_scrub: selectively re-run bulkstat after re-running inumbers
xfs_scrub: actually iterate all the bulkstat records
xfs_scrub: don't double-scan inodes during phase 3
xfs_scrub: don't (re)set the bulkstat request icount incorrectly
xfs_scrub: don't complain if bulkstat fails
xfs_scrub: return early from bulkstat_for_inumbers if no bulkstat data
xfs_scrub: don't blow away new inodes in bulkstat_single_step
xfs_scrub: hoist the phase3 bulkstat single stepping code
xfs_scrub: ignore freed inodes when single-stepping during phase 3
xfs_scrub: try harder to fill the bulkstat array with bulkstat()

libfrog/bitmask.h             |   6 +
libfrog/handle_priv.h         |  55 +++++
scrub/inodes.h                |  12 +-
io/parent.c                   |   9 +-
libfrog/Makefile              |   1 +
man/man2/ioctl_xfs_bulkstat.2 |   8 +
scrub/common.c                |   9 +-
scrub/inodes.c                | 552 ++++++++++++++++++++++++++++++++++++------
scrub/phase3.c                |   7 +-
scrub/phase5.c                |  14 +-
scrub/phase6.c                |  18 +-
spaceman/health.c             |   9 +-
12 files changed, 585 insertions(+), 115 deletions(-)

create mode 100644 libfrog/handle_priv.h

#3 lore raw

[GIT PULL 3/7] xfsprogs: new libxfs code from kernel 6.14

In reply to Darrick J. Wong

Hi Andrey,

Please pull this branch with changes for xfsprogs for 6.14-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 7ae92e1cb0aeeb333ac38393a5b3dbcda1ac769e:

xfs_scrub: try harder to fill the bulkstat array with bulkstat() (2025-02-25 09:15:57 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/libxfs-sync-6.14_2025-02-25

for you to fetch changes up to c89b1f70b43dc7d1dd7147d5147170db651131a4:

xfs: fix the entry condition of exact EOF block allocation optimization (2025-02-25 09:16:00 -0800)

----------------------------------------------------------------
xfsprogs: new libxfs code from kernel 6.14 [3/7]

Port kernel libxfs code to userspace.

----------------------------------------------------------------
Darrick J. Wong (51):
xfs: tidy up xfs_iroot_realloc
xfs: refactor the inode fork memory allocation functions
xfs: make xfs_iroot_realloc take the new numrecs instead of deltas
xfs: make xfs_iroot_realloc a bmap btree function
xfs: tidy up xfs_bmap_broot_realloc a bit
xfs: hoist the node iroot update code out of xfs_btree_new_iroot
xfs: hoist the node iroot update code out of xfs_btree_kill_iroot
xfs: add some rtgroup inode helpers
xfs: prepare to reuse the dquot pointer space in struct xfs_inode
xfs: simplify the xfs_rmap_{alloc,free}_extent calling conventions
xfs: support storing records in the inode core root
xfs: allow inode-based btrees to reserve space in the data device
xfs: introduce realtime rmap btree ondisk definitions
xfs: realtime rmap btree transaction reservations
xfs: add realtime rmap btree operations
xfs: prepare rmap functions to deal with rtrmapbt
xfs: add a realtime flag to the rmap update log redo items
xfs: pretty print metadata file types in error messages
xfs: support file data forks containing metadata btrees
xfs: add realtime reverse map inode to metadata directory
xfs: add metadata reservations for realtime rmap btrees
xfs: wire up a new metafile type for the realtime rmap
xfs: wire up rmap map and unmap to the realtime rmapbt
xfs: create routine to allocate and initialize a realtime rmap btree inode
xfs: report realtime rmap btree corruption errors to the health system
xfs: scrub the realtime rmapbt
xfs: scrub the metadir path of rt rmap btree files
xfs: online repair of realtime bitmaps for a realtime group
xfs: online repair of the realtime rmap btree
xfs: create a shadow rmap btree during realtime rmap repair
xfs: namespace the maximum length/refcount symbols
xfs: introduce realtime refcount btree ondisk definitions
xfs: realtime refcount btree transaction reservations
xfs: add realtime refcount btree operations
xfs: prepare refcount functions to deal with rtrefcountbt
xfs: add a realtime flag to the refcount update log redo items
xfs: add realtime refcount btree inode to metadata directory
xfs: add metadata reservations for realtime refcount btree
xfs: wire up a new metafile type for the realtime refcount
xfs: wire up realtime refcount btree cursors
xfs: create routine to allocate and initialize a realtime refcount btree inode
xfs: update rmap to allow cow staging extents in the rt rmap
xfs: compute rtrmap btree max levels when reflink enabled
xfs: allow inodes to have the realtime and reflink flags
xfs: recover CoW leftovers in the realtime volume
xfs: fix xfs_get_extsz_hint behavior with realtime alwayscow files
xfs: apply rt extent alignment constraints to CoW extsize hint
xfs: enable extent size hints for CoW operations
xfs: report realtime refcount btree corruption errors to the health system
xfs: scrub the realtime refcount btree
xfs: scrub the metadir path of rt refcount btree files

Jinliang Zheng (1):
xfs: fix the entry condition of exact EOF block allocation optimization

include/libxfs.h              |    2 +
include/xfs_inode.h           |    5 +-
include/xfs_mount.h           |   19 +
include/xfs_trace.h           |    7 +
libxfs/libxfs_priv.h          |   11 +
libxfs/xfs_bmap_btree.h       |    3 +
libxfs/xfs_btree.h            |   28 +-
libxfs/xfs_defer.h            |    2 +
libxfs/xfs_errortag.h         |    4 +-
libxfs/xfs_format.h           |   51 +-
libxfs/xfs_fs.h               |   10 +-
libxfs/xfs_health.h           |    6 +-
libxfs/xfs_inode_fork.h       |    6 +-
libxfs/xfs_log_format.h       |   10 +-
libxfs/xfs_metafile.h         |   13 +
libxfs/xfs_ondisk.h           |    4 +
libxfs/xfs_refcount.h         |   23 +-
libxfs/xfs_rmap.h             |   12 +-
libxfs/xfs_rtbitmap.h         |    9 +
libxfs/xfs_rtgroup.h          |   58 ++-
libxfs/xfs_rtrefcount_btree.h |  189 ++++++++
libxfs/xfs_rtrmap_btree.h     |  210 +++++++++
libxfs/xfs_shared.h           |   21 +
libxfs/xfs_trans_space.h      |   13 +
libxfs/xfs_types.h            |    7 +
io/inject.c                   |    1 +
libxfs/Makefile               |    4 +
libxfs/xfs_ag_resv.c          |    3 +
libxfs/xfs_attr.c             |    4 +-
libxfs/xfs_bmap.c             |   47 +-
libxfs/xfs_bmap_btree.c       |  111 +++++
libxfs/xfs_btree.c            |  410 ++++++++++++----
libxfs/xfs_btree_mem.c        |    1 +
libxfs/xfs_btree_staging.c    |   10 +-
libxfs/xfs_exchmaps.c         |    4 +-
libxfs/xfs_inode_buf.c        |   65 ++-
libxfs/xfs_inode_fork.c       |  201 ++++----
libxfs/xfs_metadir.c          |    3 +
libxfs/xfs_metafile.c         |  221 +++++++++
libxfs/xfs_refcount.c         |  277 +++++++++--
libxfs/xfs_rmap.c             |  178 +++++--
libxfs/xfs_rtbitmap.c         |    2 +-
libxfs/xfs_rtgroup.c          |   72 ++-
libxfs/xfs_rtrefcount_btree.c |  755 ++++++++++++++++++++++++++++++
libxfs/xfs_rtrmap_btree.c     | 1034 +++++++++++++++++++++++++++++++++++++++++
libxfs/xfs_sb.c               |   14 +
libxfs/xfs_trans_resv.c       |   37 +-
mkfs/proto.c                  |    2 +-
repair/rmap.c                 |    2 +-
repair/scan.c                 |    2 +-
50 files changed, 3805 insertions(+), 378 deletions(-)

create mode 100644 libxfs/xfs_rtrefcount_btree.h
create mode 100644 libxfs/xfs_rtrmap_btree.h
create mode 100644 libxfs/xfs_rtrefcount_btree.c
create mode 100644 libxfs/xfs_rtrmap_btree.c

#4 lore raw

[GIT PULL 4/7] xfsprogs: realtime reverse-mapping support

In reply to Darrick J. Wong

Hi Andrey,

Please pull this branch with changes for xfsprogs for 6.14-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 c89b1f70b43dc7d1dd7147d5147170db651131a4:

xfs: fix the entry condition of exact EOF block allocation optimization (2025-02-25 09:16:00 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/realtime-rmap-6.14_2025-02-25

for you to fetch changes up to d3fc26fa2ac96c39836884525065f5d47dda8b05:

mkfs: create the realtime rmap inode (2025-02-25 09:16:01 -0800)

----------------------------------------------------------------
xfsprogs: realtime reverse-mapping support [v6.6 4/7]

This is the latest revision of a patchset that adds to XFS kernel support for reverse mapping for the realtime device. This time around I've fixed some of the bitrot that I've noticed over the past few months, and most notably have converted rtrmapbt to use the metadata inode directory feature instead of burning more space in the superblock.

At the beginning of the set are patches to implement storing B+tree leaves in an inode root, since the realtime rmapbt is rooted in an inode, unlike the regular rmapbt which is rooted in an AG block. Prior to this, the only btree that could be rooted in the inode fork was the block mapping btree; if all the extent records fit in the inode, format would be switched from 'btree' to 'extents'.

The next few patches enhance the reverse mapping routines to handle the parts that are specific to rtgroups -- adding the new btree type, adding a new log intent item type, and wiring up the metadata directory tree entries.

Finally, implement GETFSMAP with the rtrmapbt and scrub functionality for the rtrmapbt and rtbitmap and online fsck functionality.

----------------------------------------------------------------
Christoph Hellwig (3):
xfs: mark xfs_dir_isempty static
xfs: remove XFS_ILOG_NONCORE
xfs: constify feature checks

Darrick J. Wong (26):
libxfs: compute the rt rmap btree maxlevels during initialization
libxfs: add a realtime flag to the rmap update log redo items
libfrog: enable scrubbing of the realtime rmap
man: document userspace API changes due to rt rmap
xfs_db: compute average btree height
xfs_db: don't abort when bmapping on a non-extents/bmbt fork
xfs_db: display the realtime rmap btree contents
xfs_db: support the realtime rmapbt
xfs_db: copy the realtime rmap btree
xfs_db: make fsmap query the realtime reverse mapping tree
xfs_db: add an rgresv command
xfs_spaceman: report health status of the realtime rmap btree
xfs_repair: tidy up rmap_diffkeys
xfs_repair: flag suspect long-format btree blocks
xfs_repair: use realtime rmap btree data to check block types
xfs_repair: create a new set of incore rmap information for rt groups
xfs_repair: refactor realtime inode check
xfs_repair: find and mark the rtrmapbt inodes
xfs_repair: check existing realtime rmapbt entries against observed rmaps
xfs_repair: always check realtime file mappings against incore info
xfs_repair: rebuild the realtime rmap btree
xfs_repair: check for global free space concerns with default btree slack levels
xfs_repair: rebuild the bmap btree for realtime files
xfs_repair: reserve per-AG space while rebuilding rt metadata
xfs_logprint: report realtime RUIs
mkfs: create the realtime rmap inode

Mirsad Todorovac (1):
xfs/libxfs: replace kmalloc() and memcpy() with kmemdup()

db/bmroot.h                           |   2 +
db/btblock.h                          |   5 +
db/field.h                            |   5 +
db/type.h                             |   1 +
include/kmem.h                        |   9 +
include/libxfs.h                      |   1 +
include/xfs_mount.h                   |  12 +-
libxfs/libxfs_api_defs.h              |  24 ++
libxfs/xfs_dir2.h                     |   1 -
libxfs/xfs_log_format.h               |   6 -
repair/bulkload.h                     |   2 +
repair/globals.h                      |   2 +
repair/incore.h                       |   1 +
repair/rmap.h                         |  15 +-
repair/rt.h                           |   4 +
repair/scan.h                         |  37 +++
db/bmap.c                             |  17 +-
db/bmroot.c                           | 135 +++++++++++
db/btblock.c                          | 103 ++++++++
db/btdump.c                           |  63 +++++
db/btheight.c                         |  36 +++
db/field.c                            |  11 +
db/fsmap.c                            | 149 +++++++++++-
db/info.c                             | 119 +++++++++
db/inode.c                            |  24 +-
db/metadump.c                         | 120 +++++++++
db/type.c                             |   5 +
libfrog/scrub.c                       |  10 +
libxfs/defer_item.c                   |  35 ++-
libxfs/init.c                         |  19 +-
libxfs/xfs_dir2.c                     |   9 +-
libxfs/xfs_rtgroup.c                  |   2 +-
logprint/log_misc.c                   |   2 +
logprint/log_print_all.c              |   8 +
logprint/log_redo.c                   |  24 +-
man/man2/ioctl_xfs_rtgroup_geometry.2 |   3 +
man/man2/ioctl_xfs_scrub_metadata.2   |  12 +-
man/man8/xfs_db.8                     |  74 +++++-
mkfs/proto.c                          |  29 +++
mkfs/xfs_mkfs.c                       |  87 ++++++-
repair/Makefile                       |   1 +
repair/agbtree.c                      |   5 +-
repair/bmap_repair.c                  | 109 ++++++++-
repair/bulkload.c                     |  41 ++++
repair/dino_chunks.c                  |  13 +
repair/dinode.c                       | 441 +++++++++++++++++++++++++++++-----
repair/dir2.c                         |   7 +
repair/globals.c                      |   6 +
repair/phase4.c                       |  14 ++
repair/phase5.c                       | 114 ++++++++-
repair/phase6.c                       |  72 ++++++
repair/rmap.c                         | 403 ++++++++++++++++++++++++-------
repair/rtrmap_repair.c                | 265 ++++++++++++++++++++
repair/scan.c                         | 411 ++++++++++++++++++++++++++++++-
repair/xfs_repair.c                   |   8 +-
scrub/repair.c                        |   1 +
spaceman/health.c                     |  10 +
57 files changed, 2910 insertions(+), 234 deletions(-)

create mode 100644 repair/rtrmap_repair.c

#5 lore raw

[GIT PULL 5/7] xfsprogs: reflink on the realtime device

In reply to Darrick J. Wong

Hi Andrey,

Please pull this branch with changes for xfsprogs for 6.14-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 d3fc26fa2ac96c39836884525065f5d47dda8b05:

mkfs: create the realtime rmap inode (2025-02-25 09:16:01 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/realtime-reflink-6.14_2025-02-25

for you to fetch changes up to 17408f8871e100b2987174b6cf480ee68e44e1a3:

mkfs: enable reflink on the realtime device (2025-02-25 09:16:02 -0800)

----------------------------------------------------------------
xfsprogs: reflink on the realtime device [v6.6 5/7]

This patchset enables use of the file data block sharing feature (i.e. reflink) on the realtime device. It follows the same basic sequence as the realtime rmap series -- first a few cleanups; then introduction of the new btree format and inode fork format. Next comes enabling CoW and remapping for the rt device; new scrub, repair, and health reporting code; and at the end we implement some code to lengthen write requests so that rt extents are always CoWed fully.

----------------------------------------------------------------
Darrick J. Wong (22):
libxfs: compute the rt refcount btree maxlevels during initialization
libxfs: add a realtime flag to the refcount update log redo items
libxfs: apply rt extent alignment constraints to CoW extsize hint
libfrog: enable scrubbing of the realtime refcount data
man: document userspace API changes due to rt reflink
xfs_db: display the realtime refcount btree contents
xfs_db: support the realtime refcountbt
xfs_db: copy the realtime refcount btree
xfs_db: add rtrefcount reservations to the rgresv command
xfs_spaceman: report health of the realtime refcount btree
xfs_repair: allow CoW staging extents in the realtime rmap records
xfs_repair: use realtime refcount btree data to check block types
xfs_repair: find and mark the rtrefcountbt inode
xfs_repair: compute refcount data for the realtime groups
xfs_repair: check existing realtime refcountbt entries against observed refcounts
xfs_repair: reject unwritten shared extents
xfs_repair: rebuild the realtime refcount btree
xfs_repair: allow realtime files to have the reflink flag set
xfs_repair: validate CoW extent size hint on rtinherit directories
xfs_logprint: report realtime CUIs
mkfs: validate CoW extent size hint when rtinherit is set
mkfs: enable reflink on the realtime device

db/bmroot.h                         |   2 +
db/btblock.h                        |   5 +
db/field.h                          |   6 +
db/type.h                           |   1 +
libxfs/libxfs_api_defs.h            |  14 ++
repair/incore.h                     |   1 +
repair/rmap.h                       |  15 +-
repair/rt.h                         |   4 +
repair/scan.h                       |  33 ++++
db/bmroot.c                         | 135 +++++++++++++++
db/btblock.c                        |  53 ++++++
db/btdump.c                         |   8 +
db/btheight.c                       |   5 +
db/field.c                          |  15 ++
db/info.c                           |  13 ++
db/inode.c                          |  22 ++-
db/metadump.c                       | 114 ++++++++++++
db/type.c                           |   5 +
libfrog/scrub.c                     |  10 ++
libxfs/defer_item.c                 |  34 +++-
libxfs/init.c                       |   8 +-
libxfs/logitem.c                    |  14 ++
logprint/log_misc.c                 |   2 +
logprint/log_print_all.c            |   8 +
logprint/log_redo.c                 |  24 ++-
man/man2/ioctl_xfs_scrub_metadata.2 |  10 +-
man/man8/xfs_db.8                   |  49 +++++-
mkfs/xfs_mkfs.c                     |  83 ++++++++-
repair/Makefile                     |   1 +
repair/agbtree.c                    |   4 +-
repair/dino_chunks.c                |  11 ++
repair/dinode.c                     | 287 +++++++++++++++++++++++++++---
repair/dir2.c                       |   5 +
repair/phase4.c                     |  34 +++-
repair/phase5.c                     |   6 +-
repair/phase6.c                     |  14 +-
repair/rmap.c                       | 241 ++++++++++++++++++++------
repair/rtrefcount_repair.c          | 257 +++++++++++++++++++++++++++
repair/scan.c                       | 337 ++++++++++++++++++++++++++++++++++--
scrub/repair.c                      |   1 +
spaceman/health.c                   |  10 ++
41 files changed, 1779 insertions(+), 122 deletions(-)

create mode 100644 repair/rtrefcount_repair.c

#6 lore raw

[GIT PULL 6/7] xfs_db: dump fs directory trees

In reply to Darrick J. Wong

Hi Andrey,

Please pull this branch with changes for xfsprogs for 6.14-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 17408f8871e100b2987174b6cf480ee68e44e1a3:

mkfs: enable reflink on the realtime device (2025-02-25 09:16:02 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/rdump-6.14_2025-02-25

for you to fetch changes up to 8c4e704f370e0361c3e3dae5f8751ff580fa95a4:

xfs_db: add command to copy directory trees out of filesystems (2025-02-25 09:16:03 -0800)

----------------------------------------------------------------
xfs_db: dump fs directory trees [6/7]

Before we disable XFS V4 support by default in the kernel ahead of abandoning the old ondisk format in 2030, let's create a userspace extraction tool so that in the future, people can extract their files without needing to load an old kernel or figure out how to set up lklfuse. This also enables at least partial data recovery from filesystems that cannot be mounted due to severe or unfixable inconsistencies.

----------------------------------------------------------------
Darrick J. Wong (4):
xfs_db: pass const pointers when we're not modifying them
xfs_db: use an empty transaction to try to prevent livelocks in path_navigate
xfs_db: make listdir more generally useful
xfs_db: add command to copy directory trees out of filesystems

db/command.h             |    1 +
db/namei.h               |   19 +
libxfs/libxfs_api_defs.h |    2 +
db/Makefile              |    3 +-
db/command.c             |    1 +
db/namei.c               |  115 +++--
db/rdump.c               | 1056 ++++++++++++++++++++++++++++++++++++++++++++++
man/man8/xfs_db.8        |   26 ++
8 files changed, 1184 insertions(+), 39 deletions(-)

create mode 100644 db/namei.h
create mode 100644 db/rdump.c

#7 lore raw

[GIT PULL 7/7] xfs_scrub: handle emoji filenames better

In reply to Darrick J. Wong

Hi Andrey,

Please pull this branch with changes for xfsprogs for 6.14-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 8c4e704f370e0361c3e3dae5f8751ff580fa95a4:

xfs_db: add command to copy directory trees out of filesystems (2025-02-25 09:16:03 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-emoji-fixes-6.14_2025-02-25

for you to fetch changes up to 195777d3d64f3a567da56f2e63f073448b8995d0:

xfs_scrub: use the display mountpoint for reporting file corruptions (2025-02-25 09:16:03 -0800)

----------------------------------------------------------------
xfs_scrub: handle emoji filenames better [7/7]

Ted told me about some bugs that the ext4 Unicode casefolding code has suffered over the past year -- they tried stripping out zero width joiner (ZWJ) codepoints to try to eliminate casefolded lookup comparison issues, but doing so corrupts compound emoji handling in filenames.

XFS of course persists names with byte accuracy (aka it doesn't do casefolding or normalization) so it's not affected by those problems. However, xfs_scrub has the ability to warn about confusing names and other utf8 shenanigans so I decided to expand fstests.

I wired up Ted's confusing names into generic/453 in fstests and it promptly crashed when trying to warn about filenames that consist entirely of compound emoji (e.g. heart + zwj + bandaid render as a heart with a bandaid over it). So there's a patch to fix that buffer overflow. There's a second patch to avoid complaining about ZWJ unless it results in confusing names in the same namespace. The third patch fixes a minor reporting problem when parent pointers are enabled.

----------------------------------------------------------------
Darrick J. Wong (3):
xfs_scrub: fix buffer overflow in string_escape
xfs_scrub: don't warn about zero width joiner control characters
xfs_scrub: use the display mountpoint for reporting file corruptions

scrub/common.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
scrub/unicrash.c | 10 ++++++++--

2 files changed, 58 insertions(+), 4 deletions(-)