comp_v1->lcm_magic = LOV_USER_MAGIC_COMP_V1;
comp_v1->lcm_size = lum_size;
comp_v1->lcm_layout_gen = 0;
- comp_v1->lcm_flags = 0;
+ comp_v1->lcm_flags = layout->llot_flags;
comp_v1->lcm_entry_count = comp_cnt;
+ comp_v1->lcm_mirror_count = 0;
offset += lum_size;
}
}
/**
+ * Set flags to the header of a component layout.
+ */
+int llapi_layout_flags_set(struct llapi_layout *layout, uint32_t flags)
+{
+ if (layout->llot_magic != LLAPI_LAYOUT_MAGIC) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ layout->llot_flags = flags;
+ return 0;
+}
+
+/**
* Fetch the start and end offset of the current layout component.
*
* \param[in] layout the layout component