[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[linux-lvm] A question about the metadata circular buffer
- From: "yuan yuan" <duanyuan0526 163 com>
- To: linux-lvm redhat com
- Subject: [linux-lvm] A question about the metadata circular buffer
- Date: Fri, 12 Dec 2008 20:35:46 +0800
Hi guys
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]