diff mbox series

[3/7] xfs_db: expose force_align feature and flags

Message ID 20230929095342.2976587-4-john.g.garry@oracle.com (mailing list archive)
State New, archived
Headers show
Series xfsprogs: Enable extent forcealign feature | expand

Commit Message

John Garry Sept. 29, 2023, 9:53 a.m. UTC
From: "Darrick J. Wong" <djwong@kernel.org>

Expose the superblock feature and inode flags.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
 db/inode.c | 3 +++
 db/sb.c    | 2 ++
 2 files changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/db/inode.c b/db/inode.c
index c9b506b905d0..b674db3ca1c6 100644
--- a/db/inode.c
+++ b/db/inode.c
@@ -207,6 +207,9 @@  const field_t	inode_v3_flds[] = {
 	{ "nrext64", FLDT_UINT1,
 	  OI(COFF(flags2) + bitsz(uint64_t) - XFS_DIFLAG2_NREXT64_BIT - 1), C1,
 	  0, TYP_NONE },
+	{ "forcealign", FLDT_UINT1,
+	  OI(COFF(flags2) + bitsz(uint64_t) - XFS_DIFLAG2_FORCEALIGN_BIT-1), C1,
+	  0, TYP_NONE },
 	{ NULL }
 };
 
diff --git a/db/sb.c b/db/sb.c
index 2d508c26a3b7..8b7d7c215a48 100644
--- a/db/sb.c
+++ b/db/sb.c
@@ -706,6 +706,8 @@  version_string(
 		strcat(s, ",NEEDSREPAIR");
 	if (xfs_has_large_extent_counts(mp))
 		strcat(s, ",NREXT64");
+	if (xfs_has_forcealign(mp))
+		strcat(s, ",FORCEALIGN");
 	return s;
 }