1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Only include visible LVs in active/open counts.

This commit is contained in:
Alasdair Kergon 2004-05-11 17:09:09 +00:00
parent 1832f310ac
commit ff4b8b64c8
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.00.16 -
=============================
Only include visible LVs in active/open counts.
Add virtual segment types, zero and error. A large sparse device can be
constructed as a writeable snapshot of a large zero segment.
Add --type to lvcreate/resize.

View File

@ -524,7 +524,8 @@ int lvs_in_vg_activated(struct volume_group *vg)
list_iterate(lvh, &vg->lvs) {
lv = list_item(lvh, struct lv_list)->lv;
count += (_lv_active(lv) == 1);
if (lv->status & VISIBLE_LV)
count += (_lv_active(lv) == 1);
}
return count;
@ -541,7 +542,8 @@ int lvs_in_vg_opened(struct volume_group *vg)
list_iterate(lvh, &vg->lvs) {
lv = list_item(lvh, struct lv_list)->lv;
count += (_lv_open_count(lv) > 0);
if (lv->status & VISIBLE_LV)
count += (_lv_open_count(lv) > 0);
}
return count;