master - snapshot: fix reporting for merged old snapshot
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5e7db7d85de7285eaee1867c73c10ee212c00631 Commit: 5e7db7d85de7285eaee1867c73c10ee212c00631 Parent: b6945b85106620cb79730070e9a38ed93e7fc35a Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Jun 9 21:00:05 2017 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Jun 9 21:03:20 2017 +0200
snapshot: fix reporting for merged old snapshot
When old snapshot is merged, lvm2 still can report some data about merged 'snapshot' - i.e. it occupied space in VG.
This patch fixes regression from commit:6fd20be629b6dceb96702c5f875a2e612e6f465d
and resolved RHBZ: 1460161
--- lib/activate/activate.c | 1 - tools/reporter.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
lib/activate/activate.c +0 -1
@@ -835,7 +835,6 @@ int lv_info_with_seg_status(struct cmd_context *cmd,* When merge is in progress, query merging origin LV instead. * COW volume is already mapped as error target in this case. */ - status->lv = olv;return 1 ; }
tools/reporter.c +2 -2
@@ -172,7 +172,7 @@ static int _do_lvs_with_info_and_status_single(struct cmd_context *cmd,if (lv_is_merging_origin (lv)) {if (!_check_merging_origin (lv, &status, &merged)) goto_out; -if (merged) +if (merged &&lv_is_thin_volume (lv->snapshot->lv)) lv = lv->snapshot->lv; }
@@ -234,7 +234,7 @@ static int _do_segs_with_info_and_status_single(struct cmd_context *cmd,if (lv_is_merging_origin (seg->lv)) {if (!_check_merging_origin (seg->lv, &status, &merged)) goto_out; -if (merged) +if (merged &&lv_is_thin_volume (seg->lv->snapshot->lv)) seg = seg->lv->snapshot; }