I have been reading the source code of lvm2 recently and met a question.
In the file lib/format_text/format-text.c :
static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
struct metadata_area *mda)
{
.....
if ((new_wrap && old_wrap) ||
(rlocn && (new_wrap || old_wrap) && (new_end > rlocn->offset)) ||
(mdac->rlocn.size >= mdah->size)) {
log_error("VG %s metadata too large for circular buffer",
vg->name);
goto out;
}
......
}
My question is , for a circular buffer, why should we check so many conditions instead of just checking (mdac->rlocn.size >= mdah->size)?
forgive my poor english. 3ks
_______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/