]> bbs.cooldavid.org Git - net-next-2.6.git/commit - drivers/md/raid5.c
[PATCH] md: Infrastructure to allow normal IO to continue while array is expanding
authorNeilBrown <neilb@suse.de>
Mon, 27 Mar 2006 09:18:08 +0000 (01:18 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 27 Mar 2006 16:45:01 +0000 (08:45 -0800)
commit7ecaa1e6a1ad69862e9980b6c777e11f26c4782d
tree3cbd64ebc2a45f6b5ac45b0305fd3cf2c6916070
parentad01c9e3752f4ba4f3d99c89b7370fa4983a25b5
[PATCH] md: Infrastructure to allow normal IO to continue while array is expanding

We need to allow that different stripes are of different effective sizes, and
use the appropriate size.  Also, when a stripe is being expanded, we must
block any IO attempts until the stripe is stable again.

Key elements in this change are:
 - each stripe_head gets a 'disk' field which is part of the key,
   thus there can sometimes be two stripe heads of the same area of
   the array, but covering different numbers of devices.  One of these
   will be marked STRIPE_EXPANDING and so won't accept new requests.
 - conf->expand_progress tracks how the expansion is progressing and
   is used to determine whether the target part of the array has been
   expanded yet or not.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid5.c
include/linux/raid/raid5.h