dm raid: small cleanup and remove unsed "struct raid_set" member
authorHeinz Mauelshagen <heinzm@redhat.com>
Sat, 2 Dec 2017 00:03:56 +0000 (01:03 +0100)
committerMike Snitzer <snitzer@redhat.com>
Fri, 8 Dec 2017 15:59:58 +0000 (10:59 -0500)
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: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c

index 7e7075fb9c28fcf54ecc1aae4e0b509787120c25..1069e617e72738431dc11b3c85482cb5b1c9b950 100644 (file)
@@ -227,7 +227,6 @@ struct rs_layout {
 struct raid_set {
        struct dm_target *ti;
 
-       uint32_t bitmap_loaded;
        uint32_t stripe_cache_entries;
        unsigned long ctr_flags;
        unsigned long runtime_flags;
@@ -3964,9 +3963,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);
@@ -3989,6 +3985,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);
        }