@@ -2066,7 +2066,9 @@ void lustre_swab_lov_comp_md_v1(struct lov_comp_md_v1 *lum)
__swab64s(&ent->lcme_extent.e_end);
__swab32s(&ent->lcme_offset);
__swab32s(&ent->lcme_size);
- BUILD_BUG_ON(offsetof(typeof(*ent), lcme_padding) == 0);
+ __swab32s(&ent->lcme_layout_gen);
+ BUILD_BUG_ON(offsetof(typeof(*ent), lcme_padding_1) == 0);
+ BUILD_BUG_ON(offsetof(typeof(*ent), lcme_padding_2) == 0);
v1 = (struct lov_user_md_v1 *)((char *)lum + off);
stripe_count = v1->lmm_stripe_count;
@@ -1536,10 +1536,18 @@ void lustre_assert_wire_constants(void)
(long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_size));
LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_size) == 4, "found %lld\n",
(long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_size));
- LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding) == 32, "found %lld\n",
- (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding));
- LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding) == 16, "found %lld\n",
- (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_layout_gen) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_layout_gen));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1) == 36, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1));
+ LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_2) == 40, "found %lld\n",
+ (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_2));
+ LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_2) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_2));
LASSERTF(LCME_FL_INIT == 0x00000010UL, "found 0x%.8xUL\n",
(unsigned int)LCME_FL_INIT);
LASSERTF(LCME_FL_NEG == 0x80000000UL, "found 0x%.8xUL\n",
@@ -517,7 +517,9 @@ struct lov_comp_md_entry_v1 {
* start from lov_comp_md_v1
*/
__u32 lcme_size; /* size of component blob */
- __u64 lcme_padding[2];
+ __u32 lcme_layout_gen;
+ __u32 lcme_padding_1;
+ __u64 lcme_padding_2;
} __packed;
#define SEQ_ID_MAX 0x0000FFFF