linux_dsm_epyc7002/drivers/block/drbd
Lars Ellenberg 074f4afeb2 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>
2014-04-30 13:46:55 -06:00
..
drbd_actlog.c drbd: prepare receiving side for REQ_DISCARD 2014-04-30 13:46:55 -06:00
drbd_bitmap.c drbd: Kill drbd_task_to_thread_name() 2014-02-17 16:50:35 +01:00
drbd_int.h drbd: Enable QUEUE_FLAG_DISCARD only if the peer can recieve P_TRIM 2014-04-30 13:46:55 -06:00
drbd_interval.c Merge branch 'drbd-8.4_ed6' into for-3.8-drivers-drbd-8.4_ed6 2012-11-09 14:20:23 +01:00
drbd_interval.h drbd: Iterate over all overlapping intervals in a tree 2011-10-14 16:47:37 +02:00
drbd_main.c drbd: prepare sending side for REQ_DISCARD 2014-04-30 13:46:55 -06:00
drbd_nl.c drbd: Enable QUEUE_FLAG_DISCARD only if the peer can recieve P_TRIM 2014-04-30 13:46:55 -06:00
drbd_nla.c drbd: Remove drbd_wrappers.h 2014-04-30 13:46:54 -06:00
drbd_nla.h drbd: Split off netlink mandatory attribute handling into separate file 2012-11-08 16:57:45 +01:00
drbd_proc.c drbd: fix stalled resync detection in /proc/drbd 2014-04-30 13:46:54 -06:00
drbd_protocol.h drbd: Enable QUEUE_FLAG_DISCARD only if the peer can recieve P_TRIM 2014-04-30 13:46:55 -06:00
drbd_receiver.c drbd: Enable QUEUE_FLAG_DISCARD only if the peer can recieve P_TRIM 2014-04-30 13:46:55 -06:00
drbd_req.c drbd: prepare sending side for REQ_DISCARD 2014-04-30 13:46:55 -06:00
drbd_req.h drbd: prepare sending side for REQ_DISCARD 2014-04-30 13:46:55 -06:00
drbd_state.c drbd: Do not BUG() when connection breaks in a special way 2014-04-30 13:46:54 -06:00
drbd_state.h drbd: Rename drbd_tconn -> drbd_connection 2014-02-17 16:44:47 +01:00
drbd_strings.c drbd: Move string function prototypes from linux/drbd.h to drbd_string.h 2014-02-17 16:50:37 +01:00
drbd_strings.h drbd: Move string function prototypes from linux/drbd.h to drbd_string.h 2014-02-17 16:50:37 +01:00
drbd_vli.h Fix common misspellings 2011-03-31 11:26:23 -03:00
drbd_worker.c drbd: fix a race between start_resync and send_and_submit 2014-04-30 13:46:55 -06:00
Kconfig drbd: update Kconfig to match current dependencies 2012-12-06 13:08:29 +01:00
Makefile drbd: Split off netlink mandatory attribute handling into separate file 2012-11-08 16:57:45 +01:00