drbd: queue bitmap writeout more intelligently
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 20 Jan 2011 09:32:05 +0000 (10:32 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 10 Mar 2011 10:47:56 +0000 (11:47 +0100)
commit79a30d2d71f7be862de93228fe9b919ef664af52
tree00f2e8a2adc5f284d50fe529eb1bae37c4eb5c2f
parent54b956abef2c1ab339fd01792e69e4a921a5e487
drbd: queue bitmap writeout more intelligently

The "lazy writeout" of cleared bitmap pages happens during resync, and
should happen again once the resync finishes cleanly, or is aborted.

If resync finished cleanly, or was aborted because of peer disk
failure, we trigger the writeout from worker context in the after
state change work.

If resync was aborted because of connection failure, we should not
immediately trigger bitmap writeout, but rather postpone the
writeout to after the connection cleanup happened.  We now do it
in the receiver context from drbd_disconnect().

If resync was aborted because of local disk failure, well, there
is nothing to write to anymore.

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