|
|
f49185 |
From bdeb014153934e1d98787a9609a7532baf6a5c37 Mon Sep 17 00:00:00 2001
|
|
|
f49185 |
From: Zorro Lang <zlang@redhat.com>
|
|
|
f49185 |
Date: Tue, 6 Apr 2021 16:56:32 -0400
|
|
|
f49185 |
Subject: [PATCH] libxfs: expose inobtcount in xfs geometry
|
|
|
f49185 |
|
|
|
f49185 |
Source kernel commit: bc41fa5321f93ecbabec177f888451cfc17ad66d
|
|
|
f49185 |
|
|
|
f49185 |
As xfs supports the feature of inode btree block counters now, expose
|
|
|
f49185 |
this feature flag in xfs geometry, for userspace can check if the
|
|
|
f49185 |
inobtcnt is enabled or not.
|
|
|
f49185 |
|
|
|
f49185 |
Signed-off-by: Zorro Lang <zlang@redhat.com>
|
|
|
f49185 |
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
|
|
|
f49185 |
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
|
|
|
f49185 |
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
|
|
f49185 |
---
|
|
|
f49185 |
|
|
|
f49185 |
diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h
|
|
|
f49185 |
index 714dba1..4e4a22e 100644
|
|
|
f49185 |
--- a/libxfs/xfs_fs.h
|
|
|
f49185 |
+++ b/libxfs/xfs_fs.h
|
|
|
f49185 |
@@ -232,6 +232,7 @@ typedef struct xfs_fsop_resblks {
|
|
|
f49185 |
#define XFS_FSOP_GEOM_FLAGS_RMAPBT 0x80000 /* reverse mapping btree */
|
|
|
f49185 |
#define XFS_FSOP_GEOM_FLAGS_REFLINK 0x100000 /* files can share blocks */
|
|
|
f49185 |
#define XFS_FSOP_GEOM_FLAGS_BIGTIME 0x200000 /* 64-bit nsec timestamps */
|
|
|
f49185 |
+#define XFS_FSOP_GEOM_FLAGS_INOBTCNT 0x400000 /* inobt btree counter */
|
|
|
f49185 |
|
|
|
f49185 |
/*
|
|
|
f49185 |
* Minimum and maximum sizes need for growth checks.
|
|
|
f49185 |
diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c
|
|
|
f49185 |
index d11545b..6249e9a 100644
|
|
|
f49185 |
--- a/libxfs/xfs_sb.c
|
|
|
f49185 |
+++ b/libxfs/xfs_sb.c
|
|
|
f49185 |
@@ -1126,6 +1126,8 @@ xfs_fs_geometry(
|
|
|
f49185 |
geo->flags |= XFS_FSOP_GEOM_FLAGS_REFLINK;
|
|
|
f49185 |
if (xfs_sb_version_hasbigtime(sbp))
|
|
|
f49185 |
geo->flags |= XFS_FSOP_GEOM_FLAGS_BIGTIME;
|
|
|
f49185 |
+ if (xfs_sb_version_hasinobtcounts(sbp))
|
|
|
f49185 |
+ geo->flags |= XFS_FSOP_GEOM_FLAGS_INOBTCNT;
|
|
|
f49185 |
if (xfs_sb_version_hassector(sbp))
|
|
|
f49185 |
geo->logsectsize = sbp->sb_logsectsize;
|
|
|
f49185 |
else
|