]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: expose inobtcount in xfs geometry
authorZorro Lang <zlang@redhat.com>
Tue, 6 Apr 2021 20:56:32 +0000 (16:56 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 6 Apr 2021 20:56:32 +0000 (16:56 -0400)
Source kernel commit: bc41fa5321f93ecbabec177f888451cfc17ad66d

As xfs supports the feature of inode btree block counters now, expose
this feature flag in xfs geometry, for userspace can check if the
inobtcnt is enabled or not.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_fs.h
libxfs/xfs_sb.c

index 2a2e3cfd94f0ccaacf9ea871a0c428e83640b2b1..6fad140d4c8e57b113f1c39204e61eb57d4b4491 100644 (file)
@@ -250,6 +250,7 @@ typedef struct xfs_fsop_resblks {
 #define XFS_FSOP_GEOM_FLAGS_RMAPBT     (1 << 19) /* reverse mapping btree */
 #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 */
 
 /*
  * Minimum and maximum sizes need for growth checks.
index f105d2e8bf201af64b98715f7e73a1c890c82cee..8037b369a9acdfeebe9f102a15e22268ec1f5f1d 100644 (file)
@@ -1135,6 +1135,8 @@ xfs_fs_geometry(
                geo->flags |= XFS_FSOP_GEOM_FLAGS_REFLINK;
        if (xfs_sb_version_hasbigtime(sbp))
                geo->flags |= XFS_FSOP_GEOM_FLAGS_BIGTIME;
+       if (xfs_sb_version_hasinobtcounts(sbp))
+               geo->flags |= XFS_FSOP_GEOM_FLAGS_INOBTCNT;
        if (xfs_sb_version_hassector(sbp))
                geo->logsectsize = sbp->sb_logsectsize;
        else