* md/raid5:Fix recover/replace stop and start repreatedly if handle stipe failed,because one disk had bad blocks.
@ 2012-03-19 10:43 kedacomkernel
0 siblings, 0 replies; 2+ messages in thread
From: kedacomkernel @ 2012-03-19 10:43 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid
From 759a61519343c64066a5a14bb97447878aa1297e Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@gmail.com>
Date: Mon, 19 Mar 2012 15:59:04 +0800
Subject: [PATCH] md/raid5:Fix recover/replace stop and start repreatedly if
handle stipe failed,because one disk had bad blocks.
When raid5 recovering,then failed because one disk had bad blocks.
The sync_request() return value which larger than 0 and set
MD_RECOVERY_INTR.Because the statement if (test_bit(MD_RECOVERY_INTR,
&mddev->recovery)) first call,so the mddev->curr_resync did not change.
After the sync done,the mddev->curr_resync did not change.So the
resync_thread will stop and start repeatedly.
Signed-off-by: majianpeng <majianpeng@gmail.com>
---
drivers/md/md.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ce88755..370c9d9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7261,11 +7261,12 @@ void md_do_sync(struct mddev *mddev)
atomic_add(sectors, &mddev->recovery_active);
}
- if (test_bit(MD_RECOVERY_INTR, &mddev->recovery))
- break;
j += sectors;
if (j>1) mddev->curr_resync = j;
+
+ if (test_bit(MD_RECOVERY_INTR, &mddev->recovery))
+ break;
mddev->curr_mark_cnt = io_sectors;
if (last_check == 0)
/* this is the earliest that rebuild will be
--
1.7.5.4
--------------
kedacomkernel
2012-03-19
^ permalink raw reply related [flat|nested] 2+ messages in thread
* md/raid5:Fix recover/replace stop and start repreatedly if handle stipe failed,because one disk had bad blocks.
@ 2012-03-20 1:20 majianpeng
0 siblings, 0 replies; 2+ messages in thread
From: majianpeng @ 2012-03-20 1:20 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid
From 759a61519343c64066a5a14bb97447878aa1297e Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@gmail.com>
Date: Mon, 19 Mar 2012 15:59:04 +0800
Subject: [PATCH] md/raid5:Fix recover/replace stop and start repreatedly if
handle stipe failed,because one disk had bad blocks.
When raid5 recovering,then failed because one disk had bad blocks.
The sync_request() return value which larger than 0 and set
MD_RECOVERY_INTR.Because the statement if (test_bit(MD_RECOVERY_INTR,
&mddev->recovery)) first call,so the mddev->curr_resync did not change.
After the sync done,the mddev->curr_resync did not change.So the
resync_thread will stop and start repeatedly.
Signed-off-by: majianpeng <majianpeng@gmail.com>
---
drivers/md/md.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ce88755..370c9d9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7261,11 +7261,12 @@ void md_do_sync(struct mddev *mddev)
atomic_add(sectors, &mddev->recovery_active);
}
- if (test_bit(MD_RECOVERY_INTR, &mddev->recovery))
- break;
j += sectors;
if (j>1) mddev->curr_resync = j;
+
+ if (test_bit(MD_RECOVERY_INTR, &mddev->recovery))
+ break;
mddev->curr_mark_cnt = io_sectors;
if (last_check == 0)
/* this is the earliest that rebuild will be
--
1.7.5.4
--------------
majianpeng
2012-03-20
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-20 1:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 10:43 md/raid5:Fix recover/replace stop and start repreatedly if handle stipe failed,because one disk had bad blocks kedacomkernel
-- strict thread matches above, loose matches on Subject: below --
2012-03-20 1:20 majianpeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).