]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid5: allow each slot to have an extra replacement device
authorNeilBrown <neilb@suse.de>
Wed, 9 Nov 2011 00:32:06 +0000 (11:32 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 9 Nov 2011 00:32:06 +0000 (11:32 +1100)
commit49852a43a583c5391e87f027ef314d852e5ee11e
tree1f93d7296e101e1d262125ccd4be71ed6abeb6c8
parent85770838b83fc35b162e3629abe2098806efd510
md/raid5: allow each slot to have an extra replacement device

Just enhance data structures to record a second device per slot to be
used as a 'replacement' device, replacing the original.
We also have a second bio in each slot in each stripe_head.  This will
only be used when writing to the array - we need to write to both the
original and the replacement at the same time, so will need two bios.

For now, only try using the replacement drive for aligned-reads.
In this case, we prefer the replacement if it has been recovered far
enough, otherwise use the original.

This includes a small enhancement.  Previously we would only do
aligned reads if the target device was fully recovered.  Now we also
do them if it has recovered far enough.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c
drivers/md/raid5.h