From f74d30d411af0849e4c7f5ac6027899a32b48f52 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 27 Sep 2021 11:00:53 +0200 Subject: [PATCH] cleanup: use already known lv size --- lib/metadata/lv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index 475f21191..21aa3b422 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -951,7 +951,7 @@ uint64_t lv_origin_size(const struct logical_volume *lv) struct lv_segment *seg; if (lv_is_cow(lv)) - return (uint64_t) find_snapshot(lv)->len * lv->vg->extent_size; + return find_snapshot(lv)->lv->size; if (lv_is_thin_volume(lv) && (seg = first_seg(lv)) && seg->external_lv)