]> git.karo-electronics.de Git - linux-beck.git/commit
drbd: change bitmap write-out when leaving resync states
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 13 Jun 2016 22:26:11 +0000 (00:26 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 14 Jun 2016 03:43:03 +0000 (21:43 -0600)
commitbe115b69f1d64e3322d46fa8d989625b39807fe5
tree614473650e4a14d4f2e563fa9870ea4a29f11611
parentc0065f98d5dd88e22bc35b89060b8bbf75f100c9
drbd: change bitmap write-out when leaving resync states

When leaving resync states because of disconnect,
do the bitmap write-out synchronously in the drbd_disconnected() path.

When leaving resync states because we go back to AHEAD/BEHIND, or
because resync actually finished, or some disk was lost during resync,
trigger the write-out from after_state_ch().

The bitmap write-out for resync -> ahead/behind was missing completely before.

Note that this is all only an optimization to avoid double-resyncs of
already completed blocks in case this node crashes.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/drbd/drbd_receiver.c
drivers/block/drbd/drbd_state.c