aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/raid
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-06-26 03:27:40 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:37 -0400
commit5fd6c1dce06ec24ef3de20fe0c7ecf2ba9fe5ef9 (patch)
treebd7cc8c22615e8622d3d63b7fc68dcc3ac1964de /include/linux/raid
parenta8a55c387da28d67d98f56e4f5021462cb61f7a6 (diff)
[PATCH] md: allow checkpoint of recovery with version-1 superblock
For a while we have had checkpointing of resync. The version-1 superblock allows recovery to be checkpointed as well, and this patch implements that. Due to early carelessness we need to add a feature flag to signal that the recovery_offset field is in use, otherwise older kernels would assume that a partially recovered array is in fact fully recovered. 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')
-rw-r--r--include/linux/raid/md_k.h6
-rw-r--r--include/linux/raid/md_p.h5
2 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index db2ca2d9066e..682574f3bd36 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -88,6 +88,10 @@ struct mdk_rdev_s
88 * array and could again if we did a partial 88 * array and could again if we did a partial
89 * resync from the bitmap 89 * resync from the bitmap
90 */ 90 */
91 sector_t recovery_offset;/* If this device has been partially
92 * recovered, this is where we were
93 * up to.
94 */
91 95
92 atomic_t nr_pending; /* number of pending requests. 96 atomic_t nr_pending; /* number of pending requests.
93 * only maintained for arrays that 97 * only maintained for arrays that
@@ -183,6 +187,8 @@ struct mddev_s
183#define MD_RECOVERY_REQUESTED 6 187#define MD_RECOVERY_REQUESTED 6
184#define MD_RECOVERY_CHECK 7 188#define MD_RECOVERY_CHECK 7
185#define MD_RECOVERY_RESHAPE 8 189#define MD_RECOVERY_RESHAPE 8
190#define MD_RECOVERY_FROZEN 9
191
186 unsigned long recovery; 192 unsigned long recovery;
187 193
188 int in_sync; /* know to not need resync */ 194 int in_sync; /* know to not need resync */
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index f1fbae7e390e..b6ebc69bae54 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -265,9 +265,12 @@ struct mdp_superblock_1 {
265 265
266/* feature_map bits */ 266/* feature_map bits */
267#define MD_FEATURE_BITMAP_OFFSET 1 267#define MD_FEATURE_BITMAP_OFFSET 1
268#define MD_FEATURE_RECOVERY_OFFSET 2 /* recovery_offset is present and
269 * must be honoured
270 */
268#define MD_FEATURE_RESHAPE_ACTIVE 4 271#define MD_FEATURE_RESHAPE_ACTIVE 4
269 272
270#define MD_FEATURE_ALL 5 273#define MD_FEATURE_ALL (1|2|4)
271 274
272#endif 275#endif
273 276