Hi guys<br><br>     I have been reading the source code of lvm2 recently and met a question.<br><br>     In the file lib/format_text/format-text.c :<br><br>      static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,<br>
                         struct metadata_area *mda)<br>{<br> .....<br>    if ((new_wrap && old_wrap) ||<br>            (rlocn && (new_wrap || old_wrap) && (new_end > rlocn->offset)) ||<br>            (mdac->rlocn.size >= mdah->size)) {<br>
                log_error("VG %s metadata too large for circular buffer",<br>                          vg->name);<br>                goto out;<br>        }<br>......<br>}<br><br>My question is , for a circular buffer, why should we check so many conditions instead of just checking (mdac->rlocn.size >= mdah->size)?<br>
forgive my poor english. 3ks<br><br>