drbd: allow bitmap to change during writeout from resync_finished
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 7 May 2012 10:07:18 +0000 (12:07 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:58:28 +0000 (16:58 +0100)
commita220d291804233e3a5e3425abf79fa1e62e7bd35
tree1a1c851e0a21de3acbff2a780bfb2d3ce5dd8760
parent5016b82a49eb06cbe2002db7bd8a5501ba4ef6d1
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_state.c