<br><br><div class="gmail_quote">On Fri, Dec 12, 2008 at 8:49 PM, Alasdair G Kergon <span dir="ltr"><<a href="mailto:agk@redhat.com">agk@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Fri, Dec 12, 2008 at 08:35:46PM +0800, yuan yuan wrote:<br>
>     if ((new_wrap && old_wrap) ||<br>
>             (rlocn && (new_wrap || old_wrap) && (new_end > rlocn->offset))<br>
> ||<br>
>             (mdac->rlocn.size >= mdah->size)) {<br>
>                 log_error("VG %s metadata too large for circular buffer",<br>
>                           vg->name);<br>
<br>
</div><div class="Ih2E3d">> My question is , for a circular buffer, why should we check so many<br>
> conditions instead of just checking (mdac->rlocn.size >= mdah->size)?<br>
<br>
</div>The buffer has to hold *two* versions of the metadata during a change,<br>
the old and the new version, and those two could be different sizes.<br>
</blockquote><div><br>Does this mean that if the buffer size is 2K, the size of the metadata can't be larger than 1K?<br>What will happen if we just hold one version?<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Alasdair<br>
<font color="#888888">--<br>
<a href="mailto:agk@redhat.com">agk@redhat.com</a><br>
<br>
_______________________________________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com">linux-lvm@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-lvm" target="_blank">https://www.redhat.com/mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br>
</font></blockquote></div><br>