[PATCH V4 00/20] xfsprogs: Extend per-inode extent counters

Chandan Babu R
2021-12-14T08:49:42Z

This patchset implements the changes to userspace programs that are
required to support extending inode's data and attr fork extent
counter fields. These changes allow programs in xfsprogs to be able to
create and work with filesystem instances with 64-bit data fork extent
counter and 32-bit attr fork extent counter fields.

The patchset can also be obtained from
https://github.com/chandanr/xfsprogs-dev.git at branch
xfs-incompat-extend-extcnt-v4.

Changelog:
V3 -> V4:
1. Rebase patchset on top of Darrick's "xfs: kill XFS_BTREE_MAXLEVELS"
patchset.
2. Carve out a 64-bit inode field out of the existing di_pad and
di_flushiter fields to hold the 64-bit data fork extent counter.
3. Use the existing 32-bit inode data fork extent counter to hold the
attr fork extent counter.
4. Pass XFS_BULK_IREQ_NREXT64 flag to the bulkstat ioctl if the
underlying filesystem support for large exent counters is detected
by the presence of XFS_FSOP_GEOM_FLAGS_NREXT64 bit.

V2 -> V3:
1. Introduce the ability to upgrade existing filesystems to use 64-bit
extent counters if it is feasible to do so.
2. Report presence of 64-bit extent counters via xfs_info.
3. Add XFS_SB_FEAT_INCOMPAT_NREXT64 to XFS_SB_FEAT_INCOMPAT_ALL in a
separate patch.
4. Rename mkfs.xfs option from extcnt64bit to nrext64.

V1 -> V2:
1. Rebase patches on top of Darrick's btree-dynamic-depth branch.
2. Add support for using the new bulkstat ioctl version to support
64-bit data fork extent counter field.

Chandan Babu R (19):
xfsprogs: Move extent count limits to xfs_format.h
xfsprogs: Introduce xfs_iext_max_nextents() helper
xfsprogs: Use xfs_extnum_t instead of basic data types
xfsprogs: Introduce xfs_dfork_nextents() helper
xfsprogs: Use basic types to define xfs_log_dinode's di_nextents and
di_anextents
xfsprogs: Promote xfs_extnum_t and xfs_aextnum_t to 64 and 32-bits
respectively
xfsprogs: Introduce XFS_SB_FEAT_INCOMPAT_NREXT64 and associated per-fs
feature bit
xfsprogs: Introduce XFS_FSOP_GEOM_FLAGS_NREXT64
xfsprogs: Introduce XFS_DIFLAG2_NREXT64 and associated helpers
xfsprogs: Use xfs_rfsblock_t to count maximum blocks that can be used
by BMBT
xfsprogs: Introduce macros to represent new maximum extent counts for
data/attr forks
xfsprogs: Introduce per-inode 64-bit extent counters
xfsprogs: Conditionally upgrade existing inodes to use 64-bit extent
counters
xfsprogs: Enable bulkstat ioctl to support 64-bit extent counters
xfsprogs: Add XFS_SB_FEAT_INCOMPAT_NREXT64 to the list of supported
flags
xfsprogs: xfs_info: Report NREXT64 feature status
xfsprogs: Add mkfs option to create filesystem with large extent
counters
xfsprogs: Add support for upgrading to NREXT64 feature
xfsprogs: Define max extent length based on on-disk format definition

Darrick J. Wong (1):
xfsprogs: xfs_repair: allow administrators to add older v5 features

db/bmap.c | 8 +-
db/btdump.c | 4 +-
db/check.c | 28 +++--
db/field.c | 4 -
db/field.h | 2 -
db/frag.c | 8 +-
db/inode.c | 187 ++++++++++++++++++++++++++--
db/metadump.c | 6 +-
fsr/xfs_fsr.c | 4 +-
include/libxfs.h | 1 +
include/xfs_inode.h | 5 +
io/bulkstat.c | 1 +
libfrog/bulkstat.c | 29 ++++-
libfrog/fsgeom.c | 6 +-
libxfs/libxfs_api_defs.h | 3 +
libxfs/xfs_bmap.c | 75 ++++++------
libxfs/xfs_format.h | 60 +++++++--
libxfs/xfs_fs.h | 13 +-
libxfs/xfs_ialloc.c | 2 +
libxfs/xfs_inode_buf.c | 62 +++++++---
libxfs/xfs_inode_fork.c | 13 +-
libxfs/xfs_inode_fork.h | 59 ++++++++-
libxfs/xfs_log_format.h | 22 +++-
libxfs/xfs_sb.c | 3 +
libxfs/xfs_trans_resv.c | 10 +-
libxfs/xfs_types.h | 11 +-
logprint/log_misc.c | 20 ++-
logprint/log_print_all.c | 18 ++-
man/man8/mkfs.xfs.8 | 7 ++
man/man8/xfs_admin.8 | 30 +++++
mkfs/xfs_mkfs.c | 29 ++++-
repair/attr_repair.c | 2 +-
repair/dinode.c | 95 +++++++++------
repair/dinode.h | 4 +-
repair/globals.c | 4 +
repair/globals.h | 4 +
repair/phase2.c | 254 +++++++++++++++++++++++++++++++++++++--
repair/phase4.c | 2 +-
repair/prefetch.c | 2 +-
repair/rmap.c | 4 +-
repair/scan.c | 6 +-
repair/xfs_repair.c | 44 +++++++
42 files changed, 944 insertions(+), 207 deletions(-)

--
2.30.2