summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-10-16 15:55:32 +1100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-08 10:20:58 -0800
commit57a0aa351bff86bd529c8638a376cf0a18b60eae (patch)
treed2b01a47668e4e29a2be0a61bab4d512a5433742 /drivers
parent8a7963564a8288a2c98d1c924d09ac0697b8f92c (diff)
md/raid1/raid10: add a cond_resched
commit 1d9d52416c0445019ccc1f0fddb9a227456eb61b upstream. During 'check' of a raid1 or raid10 it is possible for the management thread to spend a lot of time running 'memcmp' on blocks from different devices, so make sure the thread has a chance to schedule. raid5d already has a cond_resched (in process_stripe). Reported-By: Lee Howard <faxguy@howardsilvan.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/raid1.c1
-rw-r--r--drivers/md/raid10.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 8726fd7ebce5..67cd1d9fa4ba 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1676,6 +1676,7 @@ static void raid1d(mddev_t *mddev)
generic_make_request(bio);
}
}
+ cond_resched();
}
if (unplug)
unplug_slaves(mddev);
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 3d9020cf6f6e..6a5a5fb18b30 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1630,6 +1630,7 @@ static void raid10d(mddev_t *mddev)
generic_make_request(bio);
}
}
+ cond_resched();
}
if (unplug)
unplug_slaves(mddev);