mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Only include visible LVs in active/open counts.
This commit is contained in:
parent
1832f310ac
commit
ff4b8b64c8
@ -1,5 +1,6 @@
|
|||||||
Version 2.00.16 -
|
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
|
Add virtual segment types, zero and error. A large sparse device can be
|
||||||
constructed as a writeable snapshot of a large zero segment.
|
constructed as a writeable snapshot of a large zero segment.
|
||||||
Add --type to lvcreate/resize.
|
Add --type to lvcreate/resize.
|
||||||
|
@ -524,7 +524,8 @@ int lvs_in_vg_activated(struct volume_group *vg)
|
|||||||
|
|
||||||
list_iterate(lvh, &vg->lvs) {
|
list_iterate(lvh, &vg->lvs) {
|
||||||
lv = list_item(lvh, struct lv_list)->lv;
|
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;
|
return count;
|
||||||
@ -541,7 +542,8 @@ int lvs_in_vg_opened(struct volume_group *vg)
|
|||||||
|
|
||||||
list_iterate(lvh, &vg->lvs) {
|
list_iterate(lvh, &vg->lvs) {
|
||||||
lv = list_item(lvh, struct lv_list)->lv;
|
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;
|
return count;
|
||||||
|
Loading…
Reference in New Issue
Block a user