diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2017-10-09 13:53:27 +0200 |
---|---|---|
committer | Heinz Mauelshagen <heinzm@redhat.com> | 2017-10-09 13:55:01 +0200 |
commit | 554a761db2acf2216eadf0279a390ac924038286 (patch) | |
tree | 187def71f44eb53ded5a435e9b0661c38d9a8b39 | |
parent | f005a6e7922d9a95eadfbd433714c80301eba794 (diff) | |
download | lvm2-554a761db2acf2216eadf0279a390ac924038286.tar.gz |
raid: return previous reshape space allocation properly
Fix returning previous allocation of reshape space.
-rw-r--r-- | lib/metadata/raid_manip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index 885a1ca05..691ff581e 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -1692,10 +1692,10 @@ static int _lv_alloc_reshape_space(struct logical_volume *lv, static int _lv_free_reshape_space_with_status(struct logical_volume *lv, enum alloc_where *where_it_was) { uint32_t total_reshape_len; + enum alloc_where where; struct lv_segment *seg = first_seg(lv); if ((total_reshape_len = _reshape_len_per_lv(lv))) { - enum alloc_where where; /* * raid10: * @@ -1743,9 +1743,11 @@ static int _lv_free_reshape_space_with_status(struct logical_volume *lv, enum al return_0; lv->status &= ~LV_RESHAPE_DATA_OFFSET; + } else + where = alloc_none; - } else if (where_it_was) - *where_it_was = alloc_none; + if (where_it_was) + *where_it_was = where; lv->status &= ~LV_RESHAPE; |