]> git.karo-electronics.de Git - linux-beck.git/commit
drbd: fix race between drbdadm invalidate/verify and finishing resync
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 7 May 2012 10:00:56 +0000 (12:00 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:58:27 +0000 (16:58 +0100)
commit5016b82a49eb06cbe2002db7bd8a5501ba4ef6d1
tree63b88abacaf6048a64531daced95ef47b6888e03
parent07be15b12c41dbc5ceae130be2e0b655f7611691
drbd: fix race between drbdadm invalidate/verify and finishing resync

When a resync or online verify is finished or aborted,
drbd does a bulk write-out of changed bitmap pages.

If *in that very moment* a new verify or resync is triggered,
this can race:
 ASSERT( !test_bit(BITMAP_IO, &mdev->flags) ) in drbd_main.c
 FIXME going to queue 'set_n_write from StartingSync' but 'write from resync_finished' still pending?
and similar.

This can be observed with e.g. tight invalidate loops in test scripts,
and probably has no real-life implication.

Still, that race can be solved by first quiescen the device,
before starting a new resync or verify.

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