]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
md: write bitmap information to devices that are undergoing recovery.
authorNeilBrown <neilb@suse.de>
Tue, 31 Mar 2009 03:27:02 +0000 (14:27 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 31 Mar 2009 03:27:02 +0000 (14:27 +1100)
When we add some spares to an array and start recovery, and we have
a bitmap which is stored 'internally' on all devices, we call
bitmap_write_all to make sure the bitmap is correct on the new
device(s).
However that doesn't work as write_sb_page only writes to
'In_sync' devices, and devices undergoing recovery are not
'In_sync' until recovery finishes.

So extend write_sb_page (actually next_active_rdev) to include devices
that are under recovery.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/bitmap.c

index 2ef497d1848cf4ab17146447c5717bfc4aacb0ea..27f978dfe6a39a03baca9a307e45dd2805ff09dc 100644 (file)
@@ -266,7 +266,6 @@ static mdk_rdev_t *next_active_rdev(mdk_rdev_t *rdev, mddev_t *mddev)
        list_for_each_continue_rcu(pos, &mddev->disks) {
                rdev = list_entry(pos, mdk_rdev_t, same_set);
                if (rdev->raid_disk >= 0 &&
-                   test_bit(In_sync, &rdev->flags) &&
                    !test_bit(Faulty, &rdev->flags)) {
                        /* this is a usable devices */
                        atomic_inc(&rdev->nr_pending);