Commit 78a75d10 authored by Heinz Mauelshagen's avatar Heinz Mauelshagen Committed by Mike Snitzer

dm raid: small cleanup and remove unsed "struct raid_set" member

Move raid_resume()'s setting of 'rw' and 'in_sync' to just prior to
mddev_resume().

Also, remove unused 'bitmap_loaded' member from "struct raid_set".

No functional changes.
Signed-off-by: default avatarHeinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 4102d9de
...@@ -227,7 +227,6 @@ struct rs_layout { ...@@ -227,7 +227,6 @@ struct rs_layout {
struct raid_set { struct raid_set {
struct dm_target *ti; struct dm_target *ti;
uint32_t bitmap_loaded;
uint32_t stripe_cache_entries; uint32_t stripe_cache_entries;
unsigned long ctr_flags; unsigned long ctr_flags;
unsigned long runtime_flags; unsigned long runtime_flags;
...@@ -3964,9 +3963,6 @@ static void raid_resume(struct dm_target *ti) ...@@ -3964,9 +3963,6 @@ static void raid_resume(struct dm_target *ti)
attempt_restore_of_faulty_devices(rs); attempt_restore_of_faulty_devices(rs);
} }
mddev->ro = 0;
mddev->in_sync = 0;
/* Only reduce raid set size before running a disk removing reshape. */ /* Only reduce raid set size before running a disk removing reshape. */
if (mddev->delta_disks < 0) if (mddev->delta_disks < 0)
rs_set_capacity(rs); rs_set_capacity(rs);
...@@ -3989,6 +3985,8 @@ static void raid_resume(struct dm_target *ti) ...@@ -3989,6 +3985,8 @@ static void raid_resume(struct dm_target *ti)
if (test_and_clear_bit(RT_FLAG_RS_SUSPENDED, &rs->runtime_flags)) { if (test_and_clear_bit(RT_FLAG_RS_SUSPENDED, &rs->runtime_flags)) {
mddev_lock_nointr(mddev); mddev_lock_nointr(mddev);
mddev->ro = 0;
mddev->in_sync = 0;
mddev_resume(mddev); mddev_resume(mddev);
mddev_unlock(mddev); mddev_unlock(mddev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment