]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Grow/raid10: support reducing the devices in a RAID10.
authorNeilBrown <neilb@suse.de>
Thu, 4 Oct 2012 06:34:21 +0000 (16:34 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 4 Oct 2012 06:34:21 +0000 (16:34 +1000)
commitee2429e0bc33d52bc1e4831e91446e08e48dc85c
tree5577bd7a7c10980e3d2513cb3c449a2c3a17afb9
parentcb19a251a581fe78dcddd1d95dca4d8cb7664819
Grow/raid10: support reducing the devices in a RAID10.

When reducing the number of devices in a RAID10, we increase the
data offset to avoid the need for backup area.

If there is no room at the end of the device to allow this, we need
to first reduce the component size of each device.  However if there
is room, we don't want to insist on that, otherwise growing then
shrinking the array would not be idempotent.

So find the min before/after space before analysing a RAID10 for
reshape, and if the after space is insufficient, reduce the total size
of the array and the component size accordingly.

Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c