From a26e452c3e0cc84df8abd7cc8aabe4bc6d2f504d Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Fri, 29 Sep 2023 09:53:38 +0000 Subject: [PATCH 03/11] xfs_db: expose force_align feature and flags Expose the superblock feature and inode flags. Signed-off-by: "Darrick J. Wong" Signed-off-by: John Garry --- db/inode.c | 3 +++ db/sb.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/db/inode.c b/db/inode.c index 3453c08..a859196 100644 --- a/db/inode.c +++ b/db/inode.c @@ -178,6 +178,9 @@ const field_t inode_v3_flds[] = { { "bigtime", FLDT_UINT1, OI(COFF(flags2) + bitsz(uint64_t) - XFS_DIFLAG2_BIGTIME_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 cec7dce..200deac 100644 --- a/db/sb.c +++ b/db/sb.c @@ -704,6 +704,8 @@ version_string( strcat(s, ",BIGTIME"); if (xfs_sb_version_needsrepair(sbp)) strcat(s, ",NEEDSREPAIR"); + if (xfs_sb_version_hasforcealign(sbp)) + strcat(s, ",FORCEALIGN"); return s; } -- 2.33.0