[lvm-devel] Re: [linux-lvm] A question about the metadata circular buffer

yuan yuan yuanyuan0526 at gmail.com
Fri Dec 12 14:33:33 UTC 2008


On Fri, Dec 12, 2008 at 8:49 PM, Alasdair G Kergon <agk at redhat.com> wrote:

> On Fri, Dec 12, 2008 at 08:35:46PM +0800, yuan yuan wrote:
> >     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);
>
> > My question is , for a circular buffer, why should we check so many
> > conditions instead of just checking (mdac->rlocn.size >= mdah->size)?
>
> The buffer has to hold *two* versions of the metadata during a change,
> the old and the new version, and those two could be different sizes.
>

Does this mean that if the buffer size is 2K, the size of the metadata can't
be larger than 1K?
What will happen if we just hold one version?


>
> Alasdair
> --
> agk at redhat.com
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20081212/2745c85f/attachment.htm>


More information about the lvm-devel mailing list