[lustre-devel] [PATCH 07/33] lustre: obd: Reserve metadata overstriping flags

James Simmons jsimmons at infradead.org
Sun Feb 2 12:46:07 PST 2025


From: Patrick Farrell <farr0186 at gmail.com>

Reserve flag bits for metadata overstriping.

WC-bug-id: https://jira.whamcloud.com/browse/LU-12273
Lustre-commit: 8b62a8ca9c2e824d9 ("LU-12273 obd: Reserve metadata overstriping flags")
Signed-off-by: Patrick Farrell <farr0186 at gmail.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49707
Reviewed-by: Qian Yingjin <qian at ddn.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 fs/lustre/ptlrpc/wiretest.c             | 1 +
 include/uapi/linux/lustre/lustre_user.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/fs/lustre/ptlrpc/wiretest.c b/fs/lustre/ptlrpc/wiretest.c
index d4a2b82c961e..e336410a6ed1 100644
--- a/fs/lustre/ptlrpc/wiretest.c
+++ b/fs/lustre/ptlrpc/wiretest.c
@@ -1800,6 +1800,7 @@ void lustre_assert_wire_constants(void)
 	BUILD_BUG_ON(LMV_MAGIC_V1 != 0x0CD20CD0);
 	BUILD_BUG_ON(LMV_MAGIC_STRIPE != 0x0CD40CD0);
 	BUILD_BUG_ON(LMV_HASH_TYPE_MASK != 0x0000ffff);
+	BUILD_BUG_ON(LMV_HASH_FLAG_OVERSTRIPED != 0x01000000);
 	BUILD_BUG_ON(LMV_HASH_FLAG_FIXED != 0x02000000);
 	BUILD_BUG_ON(LMV_HASH_FLAG_MERGE != 0x04000000);
 	BUILD_BUG_ON(LMV_HASH_FLAG_SPLIT != 0x08000000);
diff --git a/include/uapi/linux/lustre/lustre_user.h b/include/uapi/linux/lustre/lustre_user.h
index 0383db67361d..7ee79e21e8ef 100644
--- a/include/uapi/linux/lustre/lustre_user.h
+++ b/include/uapi/linux/lustre/lustre_user.h
@@ -765,6 +765,8 @@ static inline bool lmv_is_known_hash_type(__u32 type)
 	       (type & LMV_HASH_TYPE_MASK) < LMV_HASH_TYPE_MAX;
 }
 
+/* This flag indicates that overstriping (>1 stripe per MDT) is desired */
+#define LMV_HASH_FLAG_OVERSTRIPED	0x01000000
 /* fixed layout, such directories won't split automatically */
 /* NB, update LMV_HASH_FLAG_KNOWN when adding new flag */
 #define LMV_HASH_FLAG_FIXED		0x02000000
-- 
2.39.3



More information about the lustre-devel mailing list