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

cache: used cache-pool becomes invisible

While cache-pool is in use - it is considered invisible.
This commit is contained in:
Zdenek Kabelac 2014-11-09 21:04:33 +01:00
parent 09e32e4add
commit 32e4af6479
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.112 -
=====================================
Cache-pool in use becomes invisible LV.
Don't prompt for removal of _pmspare in VG without pool metadata LV.
Deactivation of snapshot origin detects and deactivates left-over snapshots.
Properly report error when taking snapshot of any cache type LV.

View File

@ -102,6 +102,9 @@ int attach_pool_lv(struct lv_segment *seg,
seg->origin = origin;
seg->lv->status |= seg_is_cache(seg) ? CACHE : THIN_VOLUME;
if (seg_is_cache(seg))
lv_set_hidden(pool_lv); /* Used cache-pool is hidden */
if (origin && !add_seg_to_segs_using_this_lv(origin, seg))
return_0;
@ -137,6 +140,7 @@ int detach_pool_lv(struct lv_segment *seg)
if (!remove_seg_from_segs_using_this_lv(seg->pool_lv, seg))
return_0;
seg->lv->status &= ~CACHE;
lv_set_visible(seg->pool_lv);
seg->pool_lv = NULL;
return 1;
}