@@ -1778,6 +1778,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_FIXED != 0x02000000);
BUILD_BUG_ON(LMV_HASH_FLAG_MERGE != 0x04000000);
BUILD_BUG_ON(LMV_HASH_FLAG_SPLIT != 0x08000000);
BUILD_BUG_ON(LMV_HASH_FLAG_LOST_LMV != 0x10000000);
@@ -718,6 +718,9 @@ static inline bool lmv_is_known_hash_type(__u32 type)
(type & LMV_HASH_TYPE_MASK) == LMV_HASH_TYPE_CRUSH;
}
+/* fixed layout, such directories won't split automatically */
+/* NB, update LMV_HASH_FLAG_KNOWN when adding new flag */
+#define LMV_HASH_FLAG_FIXED 0x02000000
#define LMV_HASH_FLAG_MERGE 0x04000000
#define LMV_HASH_FLAG_SPLIT 0x08000000
@@ -733,6 +736,8 @@ static inline bool lmv_is_known_hash_type(__u32 type)
#define LMV_HASH_FLAG_LAYOUT_CHANGE \
(LMV_HASH_FLAG_MIGRATION | LMV_HASH_FLAG_SPLIT | LMV_HASH_FLAG_MERGE)
+#define LMV_HASH_FLAG_KNOWN 0xfe000000
+
/* both SPLIT and MIGRATION are set for directory split */
static inline bool lmv_hash_is_splitting(__u32 hash)
{