aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.h
diff options
context:
space:
mode:
authormajianpeng <majianpeng@gmail.com>2012-11-19 06:57:34 -0500
committerNeilBrown <neilb@suse.de>2012-12-13 03:52:11 -0500
commit0a19caabf01ac138bf3668786939e50ea4d9c8ac (patch)
treedc672faa83d44dbbb8097b367a35ce1cfba9c90f /drivers/md/md.h
parent4f8c55c5ad491dbc7b52ce08bb702ca39ce944cf (diff)
md: Use ->curr_resync as last completed request when cleanly aborting resync.
If a resync is aborted cleanly, ->curr_resync is a reliable record of where we got up to. If there was an error it is less reliable but we always know that ->curr_resync_completed is safe. So add a flag MD_RECOVERY_ERROR to differentiate between these cases and set recovery_cp accordingly. Signed-off-by: Jianpeng Ma <majianpeng@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r--drivers/md/md.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h
index af443ab868db..c29e62ebc488 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -307,6 +307,7 @@ struct mddev {
307 * REQUEST: user-space has requested a sync (used with SYNC) 307 * REQUEST: user-space has requested a sync (used with SYNC)
308 * CHECK: user-space request for check-only, no repair 308 * CHECK: user-space request for check-only, no repair
309 * RESHAPE: A reshape is happening 309 * RESHAPE: A reshape is happening
310 * ERROR: sync-action interrupted because io-error
310 * 311 *
311 * If neither SYNC or RESHAPE are set, then it is a recovery. 312 * If neither SYNC or RESHAPE are set, then it is a recovery.
312 */ 313 */
@@ -320,6 +321,7 @@ struct mddev {
320#define MD_RECOVERY_CHECK 7 321#define MD_RECOVERY_CHECK 7
321#define MD_RECOVERY_RESHAPE 8 322#define MD_RECOVERY_RESHAPE 8
322#define MD_RECOVERY_FROZEN 9 323#define MD_RECOVERY_FROZEN 9
324#define MD_RECOVERY_ERROR 10
323 325
324 unsigned long recovery; 326 unsigned long recovery;
325 /* If a RAID personality determines that recovery (of a particular 327 /* If a RAID personality determines that recovery (of a particular