[PATCH] md: cause md/raid1 to "repack" working devices when number of drives is changed
authorNeilBrown <neilb@cse.unsw.edu.au>
Wed, 22 Jun 2005 00:17:09 +0000 (17:17 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 22 Jun 2005 02:07:42 +0000 (19:07 -0700)
commit6ea9c07c6c6d1c14d9757dd8470dc4c85bbe9f28
tree095cf6a6830902b01896618502f20a2a89f33273
parent58a606431a704b5c240c1429a5526fac81c9800a
[PATCH] md: cause md/raid1 to "repack" working devices when number of drives is changed

i.e.  missing or failed drives are moved to the end of the list.  The means
a 3 drive md array with the first drive missing can be shrunk to a two
drive array.  Currently that isn't possible.

Also, the "last_used" device number might be out-of-range after the number
of devices is reduced, so we set it to 0.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid1.c