mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
md/raid1/raid10: add a cond_resched
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 <[email protected]> Signed-off-by: NeilBrown <[email protected]>
This commit is contained in:
parent
1442577bf6
commit
1d9d52416c
2 changed files with 2 additions and 0 deletions
|
|
@ -1683,6 +1683,7 @@ static void raid1d(mddev_t *mddev)
|
|||
generic_make_request(bio);
|
||||
}
|
||||
}
|
||||
cond_resched();
|
||||
}
|
||||
if (unplug)
|
||||
unplug_slaves(mddev);
|
||||
|
|
|
|||
|
|
@ -1632,6 +1632,7 @@ static void raid10d(mddev_t *mddev)
|
|||
generic_make_request(bio);
|
||||
}
|
||||
}
|
||||
cond_resched();
|
||||
}
|
||||
if (unplug)
|
||||
unplug_slaves(mddev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue