xfsprogs/0049-xfs_db-expose-force_align-feature-and-flags.patch
zhangjian f908c320a1 support atomic write
(cherry picked from commit 40226fa996b6e2d02ded47834cf5289a5f7160e6)
2024-06-19 11:40:47 +08:00

46 lines
1.2 KiB
Diff

From a26e452c3e0cc84df8abd7cc8aabe4bc6d2f504d Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <djwong@kernel.org>
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" <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 --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