Details
-
Bug
-
Resolution: Fixed
-
Critical
-
Lustre 2.5.0
-
3
-
9943
Description
In lod_use_defined_striping() the assertion on buf->lb_len must come after the fixup for released layouts.
mo->ldo_pattern = le32_to_cpu(v1->lmm_pattern); mo->ldo_stripe_size = le32_to_cpu(v1->lmm_stripe_size); mo->ldo_stripenr = le16_to_cpu(v1->lmm_stripe_count); mo->ldo_layout_gen = le16_to_cpu(v1->lmm_layout_gen); LASSERTF(buf->lb_len >= lov_mds_md_size(mo->ldo_stripenr, magic), "buf %p, mo %p, magic %u\n", buf, mo, magic); /* fixup for released file before object initialization */ if (mo->ldo_pattern & LOV_PATTERN_F_RELEASED) { mo->ldo_released_stripenr = mo->ldo_stripenr; mo->ldo_stripenr = 0; }
Moreover we are passing a _DEF magic to lov_mds_md_size() which only handles non-_DEF magics properly.