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/md_k.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/md_k.h')
-rw-r--r-- | include/linux/raid/md_k.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 617b9506c760..4e26ef2cacca 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -157,6 +157,9 @@ struct mddev_s | |||
157 | * DONE: thread is done and is waiting to be reaped | 157 | * DONE: thread is done and is waiting to be reaped |
158 | * REQUEST: user-space has requested a sync (used with SYNC) | 158 | * REQUEST: user-space has requested a sync (used with SYNC) |
159 | * CHECK: user-space request for for check-only, no repair | 159 | * CHECK: user-space request for for check-only, no repair |
160 | * RESHAPE: A reshape is happening | ||
161 | * | ||
162 | * If neither SYNC or RESHAPE are set, then it is a recovery. | ||
160 | */ | 163 | */ |
161 | #define MD_RECOVERY_RUNNING 0 | 164 | #define MD_RECOVERY_RUNNING 0 |
162 | #define MD_RECOVERY_SYNC 1 | 165 | #define MD_RECOVERY_SYNC 1 |
@@ -166,6 +169,7 @@ struct mddev_s | |||
166 | #define MD_RECOVERY_NEEDED 5 | 169 | #define MD_RECOVERY_NEEDED 5 |
167 | #define MD_RECOVERY_REQUESTED 6 | 170 | #define MD_RECOVERY_REQUESTED 6 |
168 | #define MD_RECOVERY_CHECK 7 | 171 | #define MD_RECOVERY_CHECK 7 |
172 | #define MD_RECOVERY_RESHAPE 8 | ||
169 | unsigned long recovery; | 173 | unsigned long recovery; |
170 | 174 | ||
171 | int in_sync; /* know to not need resync */ | 175 | int in_sync; /* know to not need resync */ |