From 1c4b7a3c2d2691f6f0accf04af2e31e4379b3baf Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Thu, 13 Jul 2017 18:27:38 +0200 Subject: [PATCH] report: fix data_offset/new_data_offset reporting --- lib/report/report.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/report/report.c b/lib/report/report.c index f61776ede..de8c06ab7 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -2578,10 +2578,10 @@ static int _segdata_offset(struct dm_report *rh, struct dm_pool *mem, struct logical_volume *lv; if ((lv = _lv_for_raid_image_seg(seg, mem))) { - uint64_t data_offset; + uint64_t data_offset = 0; if (lv_raid_data_offset(lv, &data_offset)) { - if (new_data_offset && !lv_raid_image_in_sync(seg->lv)) + if (new_data_offset && lv_is_raid_image(lv) && !lv_raid_image_in_sync(lv)) data_offset = data_offset ? 0 : (uint64_t) seg->reshape_len * lv->vg->extent_size; return dm_report_field_uint64(rh, field, &data_offset); -- 2.43.5