]> git.ipfire.org Git - thirdparty/mdadm.git/commit
imsm: return free space after volume for expand
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Mon, 29 May 2023 13:52:37 +0000 (15:52 +0200)
committerJes Sorensen <jes@trained-monkey.org>
Fri, 1 Sep 2023 15:36:45 +0000 (11:36 -0400)
commitaa19fdd45b2ba474f6a51a6d4b8f3c44ef19dafd
tree2ad5bf9e7e23c0c4ce18eb3a648f4fbac6ae345b
parentcbaa7904a175628a294ed54b4de6c52afa4f830d
imsm: return free space after volume for expand

merge_extends() routine searches for the biggest free space. For expand,
it works only in standard cases where the last volume is expanded and
the free space is determined after the last volume.
Add volume index to extent struct and use that do determine size after
super->current_vol during expand.

Limitation to last volume is no longer needed. It unblocks scenarios
where kill-subarray is used to remove first volume and later it is
recreated (now it is the second volume, even if it is placed before
existing one).

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
super-intel.c