summaryrefslogtreecommitdiff
path: root/lib/crc-itu-t.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars@linbit.com>2014-04-28 20:43:26 +0400
committerJens Axboe <axboe@fb.com>2014-04-30 23:46:55 +0400
commit074f4afeb2277bd5ecb9fa7f91eaffa55e262126 (patch)
tree3fc09287b0094b8e2fd19c09c9b70e85135a35eb /lib/crc-itu-t.c
parent20c68fdea1646ed746abf19122d7699493927005 (diff)
downloadlinux-074f4afeb2277bd5ecb9fa7f91eaffa55e262126.tar.xz
drbd: fix a race between start_resync and send_and_submit
In the drbd make request function, specifically in drbd_send_and_submit(), we decide whether we want to send the actual write request, or only a "set this block out of sync" information. We do so based on the current connection state, while holding the req_lock. The connection state is not supposed to change while holding the req_lock. But in drbd_start_resync, we did change that state anyways, while only holding the global_state_lock, which is enough to change sync-after dependencies (paused vs active resync), but not good enough to change the connection state. Fix: in drbd_start_resync, first grab the req_lock to serialize with drbd_send_and_submit(), before grabbing the global_state_lock to be able to evaluate the sync-after dependencies. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'lib/crc-itu-t.c')
0 files changed, 0 insertions, 0 deletions