Skip to contentSkip to conversation

dm raid: group rw and in_sync definitions with mddev_resume()

PATCH Superseded [email protected] 1 participant 1 message Dec 1, 2017 Device mapper

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 7/10 dm raid: group rw and in_sync definitions with mddev_resume()

From: Heinz Mauelshagen <[email protected]>

---
 drivers/md/dm-raid.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/md/dm-raid.c +2 -3
index 7fbb31ed9147..1c06417944d7 100644
@@ -3937,9 +3937,6 @@ static void raid_resume(struct dm_target *ti)
 		attempt_restore_of_faulty_devices(rs);
 	}
 
-	mddev->ro = 0;
-	mddev->in_sync = 0;
-
 	/* Only reduce raid set size before running a disk removing reshape. */
 	if (mddev->delta_disks < 0)
 		rs_set_capacity(rs);
@@ -3963,6 +3960,8 @@ static void raid_resume(struct dm_target *ti)
 
 	if (test_and_clear_bit(RT_FLAG_RS_SUSPENDED, &rs->runtime_flags)) {
 		mddev_lock_nointr(mddev);
+		mddev->ro = 0;
+		mddev->in_sync = 0;
 		mddev_resume(mddev);
 		mddev_unlock(mddev);
 	}
Signature · 1 line
2.13.6