Re: A question about the metadata circular buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Alasdair
-- 
agk@redhat.com

_______________________________________________
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/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux