From: Mike Snitzer Date: Wed, 13 Jan 2010 01:49:22 +0000 (+0000) Subject: When there is merging snapshot, report percentage on the origin LV. X-Git-Tag: v2_02_91~2386 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=c45af88a83a9b21931664e1599da3cb794ca78bf;p=lvm2.git When there is merging snapshot, report percentage on the origin LV. Because the snapshot LV will be hidden this is needed so the user can see merging progress with "lvs" command. --- diff --git a/lib/report/report.c b/lib/report/report.c index b2e32dbbe..221c8dee6 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -1023,7 +1023,7 @@ static int _snpercent_disp(struct dm_report *rh __attribute((unused)), struct dm return 0; } - if (!lv_is_cow(lv) || + if ((!lv_is_cow(lv) && !lv->merging_snapshot) || (lv_info(lv->vg->cmd, lv, &info, 0, 0) && !info.exists)) { *sortval = UINT64_C(0); dm_report_field_set_value(field, "", sortval);