[PATCH V4 09/20] xfsprogs: Introduce XFS_FSOP_GEOM_FLAGS_NREXT64

Chandan Babu R
2021-12-14T08:50:00Z

XFS_FSOP_GEOM_FLAGS_NREXT64 indicates that the current filesystem instance
supports 64-bit per-inode extent counters.

Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
---
libxfs/xfs_fs.h | 1 +
libxfs/xfs_sb.c | 3 +++
2 files changed, 4 insertions(+)

diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h
index bde2b4c6..7260b140 100644
--- a/libxfs/xfs_fs.h
+++ b/libxfs/xfs_fs.h
@@ -251,6 +251,7 @@ typedef struct xfs_fsop_resblks {
#define XFS_FSOP_GEOM_FLAGS_REFLINK (1 << 20) /* files can share blocks */
#define XFS_FSOP_GEOM_FLAGS_BIGTIME (1 << 21) /* 64-bit nsec timestamps */
#define XFS_FSOP_GEOM_FLAGS_INOBTCNT (1 << 22) /* inobt btree counter */
+#define XFS_FSOP_GEOM_FLAGS_NREXT64 (1 << 23) /* 64-bit extent counter */

/*
* Minimum and maximum sizes need for growth checks.
diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c
index b2e214ee..7bea660a 100644
--- a/libxfs/xfs_sb.c
+++ b/libxfs/xfs_sb.c
@@ -1020,6 +1020,9 @@ xfs_fs_geometry(
geo->logsectsize = sbp->sb_logsectsize;
else
geo->logsectsize = BBSIZE;
+ if (xfs_sb_version_hasnrext64(sbp))
+ geo->flags |= XFS_FSOP_GEOM_FLAGS_NREXT64;
+
geo->rtsectsize = sbp->sb_blocksize;
geo->dirblocksize = xfs_dir2_dirblock_bytes(sbp);

--
2.30.2