mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cache: restore reported origin field
Commit 199697accf
rerouted funtion
for priting cache volume origin to lvm2app app function - which
however had a bug. So restore the original functionality
and print correct LV as cache origin LV.
This commit is contained in:
parent
414d39085c
commit
67d4b3b7f2
@ -1,5 +1,6 @@
|
||||
Version 2.02.166 -
|
||||
=====================================
|
||||
Fix reported origin lv field for cache volumes. (2.02.133)
|
||||
Always specify snapshot cow LV for monitoring not internal LV. (2.02.165)
|
||||
Fix lvchange --discard|--zero for active thin-pool.
|
||||
Enforce 4MiB or 25% metadata free space for thin pool operations.
|
||||
|
@ -537,8 +537,8 @@ struct logical_volume *lv_origin_lv(const struct logical_volume *lv)
|
||||
|
||||
if (lv_is_cow(lv))
|
||||
origin = origin_from_cow(lv);
|
||||
else if (lv_is_cache(lv) && first_seg(lv)->origin)
|
||||
origin = first_seg(lv)->origin;
|
||||
else if (lv_is_cache(lv) && !lv_is_pending_delete(lv))
|
||||
origin = seg_lv(first_seg(lv), 0);
|
||||
else if (lv_is_thin_volume(lv) && first_seg(lv)->origin)
|
||||
origin = first_seg(lv)->origin;
|
||||
else if (lv_is_thin_volume(lv) && first_seg(lv)->external_lv)
|
||||
|
@ -85,6 +85,7 @@ lvremove -f $vg
|
||||
lvcreate --type cache-pool -L1 $vg/cpool
|
||||
lvcreate -H -L4 -n $lv1 $vg/cpool
|
||||
|
||||
check lv_field $vg/$lv1 origin "[${lv1}_corig]"
|
||||
check lv_field $vg/$lv1 copy_percent "0.00"
|
||||
# there should be something present (value differs per policy version)
|
||||
test -n "$(get lv_field $vg/$lv1 data_percent)"
|
||||
|
Loading…
Reference in New Issue
Block a user