mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
raid: define seg->extents_copied
seg->extents_copied has to be defined properly on reducing the size of a raid LV or conversion from raid5 with 1 stripe to raid1 will fail. Related: rhbz834579 Related: rhbz1191935 Related: rhbz1191978
This commit is contained in:
parent
aedac100f9
commit
3a5561e5ab
@ -1393,6 +1393,8 @@ static int _lv_reduce(struct logical_volume *lv, uint32_t extents, int delete)
|
||||
lv->le_count -= extents;
|
||||
|
||||
lv->size = (uint64_t) lv->le_count * lv->vg->extent_size;
|
||||
if (seg)
|
||||
seg->extents_copied = seg->len;
|
||||
|
||||
if (!delete)
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user