Thread (4 messages) 4 messages, 3 authors, 2012-11-19

[PATCH 1/5] md: When resync aborted,using ->curr_resync as the last completed request rather than ->curr_resync_completed.

flat view
STALE5072d

From: kernelmail <hidden>
Date: 2012-10-27 02:28:58
Subsystem: software raid (multiple disks) support, the rest · Maintainers: Song Liu, Yu Kuai, Linus Torvalds

In commit(db91ff55bdf06736b849afc1b1fce5763bbb8d5d),it said:
If a resync is aborted we should record how far we got
(recovery_cp) the last request that we know has completed
(->curr_resync_completed) rather than the last request that was
submitted (->curr_resync).
But when resync aborted, it execed
wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active));
After this, the ->curr_resync is the last completed request.

Signed-off-by: Jianpeng Ma <redacted>
---
 drivers/md/md.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 9ab768a..1d9940d 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7558,8 +7558,7 @@ void md_do_sync(struct md_thread *thread)
 					printk(KERN_INFO
 					       "md: checkpointing %s of %s.\n",
 					       desc, mdname(mddev));
-					mddev->recovery_cp =
-						mddev->curr_resync_completed;
+					mddev->recovery_cp = mddev->curr_resync;
 				}
 			} else
 				mddev->recovery_cp = MaxSector;
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help