1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

cleanup: use already known lv size

This commit is contained in:
Zdenek Kabelac 2021-09-27 11:00:53 +02:00
parent a8a958cc04
commit f74d30d411

View File

@ -951,7 +951,7 @@ uint64_t lv_origin_size(const struct logical_volume *lv)
struct lv_segment *seg; struct lv_segment *seg;
if (lv_is_cow(lv)) 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)) && if (lv_is_thin_volume(lv) && (seg = first_seg(lv)) &&
seg->external_lv) seg->external_lv)