On 5/9/22 4:18 PM, Donald Buczek wrote:
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -9432,10 +9432,17 @@ void md_reap_sync_thread(struct mddev *mddev)
{
struct md_rdev *rdev;
sector_t old_dev_sectors = mddev->dev_sectors;
- bool is_reshaped = false;
+ bool is_reshaped = false, is_locked = false;
+ if (mddev_is_locked(mddev)) {
+ is_locked = true;
+ mddev_unlock(mddev);
Hmmm. Can it be excluded, that another task is holding the mutex?
Yes, it is hacky as Song said, so we probably go back to v2.
Thanks,
Guoqing