aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.h
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2013-06-25 02:23:59 -0400
committerNeilBrown <neilb@suse.de>2013-06-25 22:38:24 -0400
commitc4a39551451666229b4ea5e8aae8ca0131d00665 (patch)
treee14b0de074da6e062275795b6530e5661d7c5acf /drivers/md/md.h
parenteea136d69f9facb2d3807386bbac1e6b1161795f (diff)
MD: Remember the last sync operation that was performed
MD: Remember the last sync operation that was performed This patch adds a field to the mddev structure to track the last sync operation that was performed. This is especially useful when it comes to what is recorded in mismatch_cnt in sysfs. If the last operation was "data-check", then it reports the number of descrepancies found by the user-initiated check. If it was a "repair" operation, then it is reporting the number of descrepancies repaired. etc. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r--drivers/md/md.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h
index 653f992b687a..20f02c0b5f2d 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -268,6 +268,14 @@ struct mddev {
268 268
269 struct md_thread *thread; /* management thread */ 269 struct md_thread *thread; /* management thread */
270 struct md_thread *sync_thread; /* doing resync or reconstruct */ 270 struct md_thread *sync_thread; /* doing resync or reconstruct */
271
272 /* 'last_sync_action' is initialized to "none". It is set when a
273 * sync operation (i.e "data-check", "requested-resync", "resync",
274 * "recovery", or "reshape") is started. It holds this value even
275 * when the sync thread is "frozen" (interrupted) or "idle" (stopped
276 * or finished). It is overwritten when a new sync operation is begun.
277 */
278 char *last_sync_action;
271 sector_t curr_resync; /* last block scheduled */ 279 sector_t curr_resync; /* last block scheduled */
272 /* As resync requests can complete out of order, we cannot easily track 280 /* As resync requests can complete out of order, we cannot easily track
273 * how much resync has been completed. So we occasionally pause until 281 * how much resync has been completed. So we occasionally pause until