Commit 5f869f1b authored by John L. Hammond's avatar John L. Hammond Committed by Oleg Drokin
Browse files

LU-14012 lod: properly initialize lcm in lod_layout_convert()

In lod_layout_convert() zero out lcm and lcme before constructing the
converted layout.

Lustre-commit: 6f2a1c91

Signed-off-by: default avatarJohn L. Hammond <>
Change-Id: I40f96d51cb63816a9bfc34217f02ff7c450de974

Tested-by: default avatarjenkins <>
Tested-by: default avatarMaloo <>
Reviewed-by: default avatarOleg Drokin <>
parent 44f354e5
......@@ -3225,13 +3225,13 @@ static int lod_layout_convert(struct lod_thread_info *info)
lcm = info->lti_ea_store;
memset(lcm, 0, sizeof(*lcm) + sizeof(*lcme));
lcm->lcm_magic = cpu_to_le32(LOV_MAGIC_COMP_V1);
lcm->lcm_size = cpu_to_le32(size);
lcm->lcm_layout_gen = cpu_to_le32(le16_to_cpu(
lcm->lcm_flags = cpu_to_le16(LCM_FL_NONE);
lcm->lcm_entry_count = cpu_to_le16(1);
lcm->lcm_mirror_count = 0;
lcme = &lcm->lcm_entries[0];
lcme->lcme_flags = cpu_to_le32(LCME_FL_INIT);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment