struct lov_ost_data_v1 *objs;
__u32 magic;
__u16 comp_cnt;
+ __u16 mirror_cnt;
int rc = 0, i;
ENTRY;
comp_cnt = le16_to_cpu(comp_v1->lcm_entry_count);
if (comp_cnt == 0)
RETURN(-EINVAL);
+ mirror_cnt = le16_to_cpu(comp_v1->lcm_mirror_count) + 1;
mo->ldo_is_composite = 1;
} else {
mo->ldo_is_composite = 0;
comp_cnt = 1;
+ mirror_cnt = 0;
}
+ mo->ldo_layout_gen = le16_to_cpu(v1->lmm_layout_gen);
- rc = lod_alloc_comp_entries(mo, comp_cnt);
+ rc = lod_alloc_comp_entries(mo, mirror_cnt, comp_cnt);
if (rc)
RETURN(rc);
GOTO(out, rc);
}
}
+
+ rc = lod_fill_mirrors(mo);
+ if (rc)
+ GOTO(out, rc);
out:
if (rc)
lod_object_free_striping(env, mo);
struct lov_comp_md_v1 *comp_v1 = NULL;
__u32 magic;
__u16 comp_cnt;
+ __u16 mirror_cnt;
int i, rc;
ENTRY;
comp_cnt = comp_v1->lcm_entry_count;
if (comp_cnt == 0)
RETURN(-EINVAL);
+ mirror_cnt = comp_v1->lcm_mirror_count + 1;
lo->ldo_is_composite = 1;
} else {
comp_cnt = 1;
+ mirror_cnt = 0;
lo->ldo_is_composite = 0;
}
- rc = lod_alloc_comp_entries(lo, comp_cnt);
+ rc = lod_alloc_comp_entries(lo, mirror_cnt, comp_cnt);
if (rc)
RETURN(rc);