diff options
author | NeilBrown <neilb@suse.de> | 2006-03-27 04:18:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:45:01 -0500 |
commit | ccfcc3c10b2a5cb8fd3c918199a4ff904fc6fb3e (patch) | |
tree | 0c86fe6ba0f0bafd76f86f81b7425d6d497664aa /include/linux/raid/raid5.h | |
parent | 7ecaa1e6a1ad69862e9980b6c777e11f26c4782d (diff) |
[PATCH] md: Core of raid5 resize process
This patch provides the core of the resize/expand process.
sync_request notices if a 'reshape' is happening and acts accordingly.
It allocated new stripe_heads for the next chunk-wide-stripe in the target
geometry, marking them STRIPE_EXPANDING.
Then it finds which stripe heads in the old geometry can provide data needed
by these and marks them STRIPE_EXPAND_SOURCE. This causes stripe_handle to
read all blocks on those stripes.
Once all blocks on a STRIPE_EXPAND_SOURCE stripe_head are read, any that are
needed are copied into the corresponding STRIPE_EXPANDING stripe_head. Once a
STRIPE_EXPANDING stripe_head is full, it is marks STRIPE_EXPAND_READY and then
is written out and released.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid/raid5.h')
-rw-r--r-- | include/linux/raid/raid5.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index 6fa274aea2a0..55c738d50508 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
@@ -157,6 +157,7 @@ struct stripe_head { | |||
157 | #define R5_ReadError 8 /* seen a read error here recently */ | 157 | #define R5_ReadError 8 /* seen a read error here recently */ |
158 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ | 158 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ |
159 | 159 | ||
160 | #define R5_Expanded 10 /* This block now has post-expand data */ | ||
160 | /* | 161 | /* |
161 | * Write method | 162 | * Write method |
162 | */ | 163 | */ |
@@ -176,7 +177,8 @@ struct stripe_head { | |||
176 | #define STRIPE_DEGRADED 7 | 177 | #define STRIPE_DEGRADED 7 |
177 | #define STRIPE_BIT_DELAY 8 | 178 | #define STRIPE_BIT_DELAY 8 |
178 | #define STRIPE_EXPANDING 9 | 179 | #define STRIPE_EXPANDING 9 |
179 | 180 | #define STRIPE_EXPAND_SOURCE 10 | |
181 | #define STRIPE_EXPAND_READY 11 | ||
180 | /* | 182 | /* |
181 | * Plugging: | 183 | * Plugging: |
182 | * | 184 | * |