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:
parent
09e32e4add
commit
32e4af6479
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user