]> git.baikalelectronics.ru Git - kernel.git/commit
drbd: flush drbd work queue before invalidate/invalidate remote
authorLars Ellenberg <lars.ellenberg@linbit.com>
Tue, 19 Jun 2012 08:27:58 +0000 (10:27 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Tue, 24 Jul 2012 12:15:58 +0000 (14:15 +0200)
commit3da9a7849602772e3faa51263f476a7db2f4e32c
tree34a4e86335dc8f6dca13abcae3bf60ca5f8b37ab
parent9910a12562c0d9d9e01992c22225b4d393ce1bb7
drbd: flush drbd work queue before invalidate/invalidate remote

If you do back to back wait-sync/invalidate on a Primary in a tight loop,
during application IO load, you could trigger a race:
  kernel: block drbd6: FIXME going to queue 'set_n_write from StartingSync'
but 'write from resync_finished' still pending?

Fix this by changing the order of the drbd_queue_work() and
the wake_up() in dec_ap_pending(), and adding the additional
drbd_flush_workqueue() before requesting the full sync.

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