mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
report: fix data_offset/new_data_offset reporting
This commit is contained in:
parent
6685460f5a
commit
1c4b7a3c2d
@ -2578,10 +2578,10 @@ static int _segdata_offset(struct dm_report *rh, struct dm_pool *mem,
|
|||||||
struct logical_volume *lv;
|
struct logical_volume *lv;
|
||||||
|
|
||||||
if ((lv = _lv_for_raid_image_seg(seg, mem))) {
|
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 (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;
|
data_offset = data_offset ? 0 : (uint64_t) seg->reshape_len * lv->vg->extent_size;
|
||||||
|
|
||||||
return dm_report_field_uint64(rh, field, &data_offset);
|
return dm_report_field_uint64(rh, field, &data_offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user