]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: Introduce XFS_FSOP_GEOM_FLAGS_NREXT64
authorChandan Babu R <chandan.babu@oracle.com>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
Source kernel commit: 7c05aa9d9d2014937c8dacbd514bca2592b11f48

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

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_fs.h
libxfs/xfs_sb.c

index 505533c43a92aa1c7f0b1f522c9bddc04ee6d100..1f7238db35cc926d9feed0dab8b172867a96a33d 100644 (file)
@@ -236,6 +236,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) /* large extent counters */
 
 /*
  * Minimum and maximum sizes need for growth checks.
index 7ab13e07eeb4c857ebb1a15663451f63c4c52959..8781cd806d7f56bd149c8c56f4cd68f31a7c1afd 100644 (file)
@@ -1136,6 +1136,8 @@ xfs_fs_geometry(
        } else {
                geo->logsectsize = BBSIZE;
        }
+       if (xfs_has_large_extent_counts(mp))
+               geo->flags |= XFS_FSOP_GEOM_FLAGS_NREXT64;
        geo->rtsectsize = sbp->sb_blocksize;
        geo->dirblocksize = xfs_dir2_dirblock_bytes(sbp);