]> git.karo-electronics.de Git - karo-tx-linux.git/commit
DM RAID: Fix for "sync" directive ineffectiveness
authorJonathan Brassow <jbrassow@redhat.com>
Thu, 27 Sep 2012 02:37:26 +0000 (12:37 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:26 +0000 (12:37 +1000)
commitd945f761bfbe2e6636120d1605378dee2ca0c8e8
treefcf6a73e375e7a3d2a8e6211b102bc1196b3d976
parentea9457ef5c50e2af87e55cdea8aedda45f9bacff
DM RAID: Fix for "sync" directive ineffectiveness

There are two table arguments that can be given to a DM RAID target
that control whether the array is forced to (re)synchronize or skip
initialization: "sync" and "nosync".  When "sync" is given, we set
mddev->recovery_cp to 0 in order to cause the device to resynchronize.
This is insufficient if there is a bitmap in use, because the array
will simply look at the bitmap and see that there is no recovery
necessary.

The fix is to skip over the loading of the superblocks when "sync" is
given, causing new superblocks to be written that will force the array
to go through initialization (i.e. synchronization).

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/dm-raid.c