summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2011-06-03 21:18:13 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-06-30 09:23:41 +0200
commit829c60878626be290a4c248e8f1b86a0d5cbd38b (patch)
tree3774c1a3abb72bcc5ab0b37a23fdd9727ca188e4 /drivers/block/drbd/drbd_main.c
parent0cfdd247d1779d5ffc8f685b172a526ecdc6773f (diff)
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>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
0 files changed, 0 insertions, 0 deletions