drbd: allow bitmap to change during writeout from resync_finished
authorLars Ellenberg <lars.ellenberg@linbit.com>
Wed, 25 Apr 2012 21:06:45 +0000 (23:06 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 9 May 2012 13:17:00 +0000 (15:17 +0200)
commit0e8488ade26b4b16a9745aa15ecb88c3fb1cb953
tree368b5bf6ddf7a687303a6e01ce33460dbc096287
parenta574daf5d722f4ca8cc18509f30b804c4d519962
drbd: allow bitmap to change during writeout from resync_finished

Symptom: messages similar to
 "FIXME asender in bm_change_bits_to,
  bitmap locked for 'write from resync_finished' by worker"

If a resync or verify is finished (or aborted), a full bitmap writeout
is triggered.  If we have ongoing local IO, the bitmap may still change
during that writeout, pending and not yet processed acks may cause bits
to be cleared, while new writes may cause bits to be to be set.

To fix this, introduce the drbd_bm_write_copy_pages() variant.

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