kernel_optimize_test/drivers/block/drbd
Lars Ellenberg 829c608786 drbd: add missing spinlock to bitmap receive
During bitmap exchange, when using the RLE bitmap compression scheme,
we have a code path that can set the whole bitmap at once.

To avoid holding spin_lock_irq() for too long, we used to lock out other
bitmap modifications during bitmap exchange by other means, and then,
knowing we have exclusive access to the bitmap, modify it without
the spinlock, and with IRQs enabled.

Since we now allow local IO to continue, potentially setting additional
bits during the bitmap receive phase, this is no longer true, and we get
uncoordinated updates of bitmap members, causing bm_set to no longer
accurately reflect the total number of set bits.

To actually see this, you'd need to have a large bitmap, use RLE bitmap
compression, and have busy IO during sync handshake and bitmap exchange.

Fix this by taking the spin_lock_irq() in this code path as well, but
calling cond_resched_lock() after each page worth of bits processed.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
2011-06-30 09:23:41 +02:00
..
drbd_actlog.c drbd: Fix spelling 2011-05-24 10:21:29 +02:00
drbd_bitmap.c drbd: add missing spinlock to bitmap receive 2011-06-30 09:23:41 +02:00
drbd_int.h drbd: fix warning 2011-05-24 10:38:33 +02:00
drbd_main.c drbd: Fix spelling 2011-05-24 10:21:29 +02:00
drbd_nl.c drbd: fix warning 2011-05-24 10:38:32 +02:00
drbd_proc.c drbd: allow petabyte storage on 64bit arch 2011-03-10 11:43:24 +01:00
drbd_receiver.c drbd: fix warning 2011-05-24 10:38:32 +02:00
drbd_req.c drbd: Fix spelling 2011-05-24 10:21:29 +02:00
drbd_req.h drbd: fix warning 2011-05-24 10:38:33 +02:00
drbd_strings.c drbd: Rename enum drbd_state_ret_codes to enum drbd_state_rv 2011-03-10 11:36:18 +01:00
drbd_vli.h Fix common misspellings 2011-03-31 11:26:23 -03:00
drbd_worker.c drbd: Use the correct max_bio_size when creating resync requests 2011-06-30 09:23:40 +02:00
drbd_wrappers.h drbd: Get rid of unnecessary macros (2) 2011-03-10 11:36:15 +01:00
Kconfig
Makefile