linux/drivers/block/drbd
Lars Ellenberg e9e6f3ec53 drbd: fix for possible deadlock on IO error during resync
Scenario:

Something (say, flush-147:0) is in drbd_al_begin_io,
holding a local_cnt, waiting for the resync to make progress.

Disk fails, worker in after_state_ch does drbd_rs_cancel_all,
then waits for local_cnt to drop to zero.

flush-147:0 is woken by drbd_rs_cancel_all, needs to write an AL
transaction, and queues that on the worker.

Deadlock.

Fix: do not wait in the worker, have put_ldev() trigger the
state change D_FAILED -> D_DISKLESS when necessary.
put_ldev() cannot do the state change directly, as it may or may not
already hold various spinlocks. We queue a short work instead.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
2010-10-14 18:38:50 +02:00
..
drbd_actlog.c drbd: reduce code duplication when receiving data requests 2010-10-14 18:38:19 +02:00
drbd_bitmap.c drbd: Disable activity log updates when the whole device is out of sync 2010-10-14 18:38:26 +02:00
drbd_int.h drbd: fix for possible deadlock on IO error during resync 2010-10-14 18:38:50 +02:00
drbd_main.c drbd: fix for possible deadlock on IO error during resync 2010-10-14 18:38:50 +02:00
drbd_nl.c drbd: protocol compatibility for maximum packet sizes 2010-10-14 18:38:41 +02:00
drbd_proc.c drbd: Track the reasons to suspend IO in dedicated state bits 2010-10-14 18:38:40 +02:00
drbd_receiver.c drbd: fix unlikely access after free and list corruption 2010-10-14 18:38:49 +02:00
drbd_req.c drbd: Track the reasons to suspend IO in dedicated state bits 2010-10-14 18:38:40 +02:00
drbd_req.h drbd: Disable activity log updates when the whole device is out of sync 2010-10-14 18:38:26 +02:00
drbd_strings.c drbd: don't start a resync without access to up-to-date Data 2010-05-18 01:08:18 +02:00
drbd_vli.h The DRBD driver 2009-10-01 21:17:49 +02:00
drbd_worker.c drbd: fix unlikely access after free and list corruption 2010-10-14 18:38:49 +02:00
drbd_wrappers.h drbd: Allow drbd_epoch_entries to use multiple bios. 2010-05-18 02:01:23 +02:00
Kconfig drbd: Kconfig fix 2009-12-29 17:38:28 +01:00
Makefile drbd: remove tracing bits 2009-10-01 21:17:58 +02:00