diff options
author | NeilBrown <neilb@suse.de> | 2006-06-26 07:27:40 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 16:58:37 (GMT) |
commit | 5fd6c1dce06ec24ef3de20fe0c7ecf2ba9fe5ef9 (patch) | |
tree | bd7cc8c22615e8622d3d63b7fc68dcc3ac1964de /include | |
parent | a8a55c387da28d67d98f56e4f5021462cb61f7a6 (diff) | |
download | linux-fsl-qoriq-5fd6c1dce06ec24ef3de20fe0c7ecf2ba9fe5ef9.tar.xz |
[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')
-rw-r--r-- | include/linux/raid/md_k.h | 6 | ||||
-rw-r--r-- | include/linux/raid/md_p.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index db2ca2d..682574f 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -88,6 +88,10 @@ struct mdk_rdev_s * array and could again if we did a partial * resync from the bitmap */ + sector_t recovery_offset;/* If this device has been partially + * recovered, this is where we were + * up to. + */ atomic_t nr_pending; /* number of pending requests. * only maintained for arrays that @@ -183,6 +187,8 @@ struct mddev_s #define MD_RECOVERY_REQUESTED 6 #define MD_RECOVERY_CHECK 7 #define MD_RECOVERY_RESHAPE 8 +#define MD_RECOVERY_FROZEN 9 + unsigned long recovery; 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 f1fbae7..b6ebc69 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h @@ -265,9 +265,12 @@ struct mdp_superblock_1 { /* feature_map bits */ #define MD_FEATURE_BITMAP_OFFSET 1 +#define MD_FEATURE_RECOVERY_OFFSET 2 /* recovery_offset is present and + * must be honoured + */ #define MD_FEATURE_RESHAPE_ACTIVE 4 -#define MD_FEATURE_ALL 5 +#define MD_FEATURE_ALL (1|2|4) #endif |