linux/drivers/block/drbd
Lars Ellenberg 009ba89db5 drbd: fix schedule in atomic
An administrative detach used to request a state change directly to D_DISKLESS,
first suspending IO to avoid the last put_ldev() occuring from an endio handler,
potentially in irq context.

This is not enough on the receiving side (typically secondary), we may miss
some peer_req on the way to local disk, which then may do the last put_ldev()
from their drbd_peer_request_endio().

This patch makes the detach always go through the intermediate D_FAILED state.
We may consider to rename it D_DETACHING.

Alternative approach would be to create yet an other work item to be scheduled
on the worker, do the destructor work from there, and get the timing right.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
2012-11-08 16:53:01 +01:00
..
Kconfig drbd: Kconfig fix 2009-12-29 17:38:28 +01:00
Makefile drbd: Moved the state functions into its own source file 2011-09-28 10:26:43 +02:00
drbd_actlog.c drbd: fix copy/paste error in comment 2012-11-08 16:52:57 +01:00
drbd_bitmap.c drbd: introduce a bio_set to allocate housekeeping bios from 2011-10-14 16:48:06 +02:00
drbd_int.h drbd: Introduce a "lockless" variant of drbd_send_protocoll() 2012-11-08 16:52:59 +01:00
drbd_interval.c drbd: Iterate over all overlapping intervals in a tree 2011-10-14 16:47:37 +02: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: fix thread stop deadlock 2012-11-08 16:53:00 +01:00
drbd_nl.c drbd: fix schedule in atomic 2012-11-08 16:53:01 +01:00
drbd_proc.c drbd: rcu_read_lock() and rcu_dereference() for tconn->net_conf 2012-11-08 16:48:59 +01:00
drbd_receiver.c drbd: fix race when forcefully disconnecting 2012-11-08 16:53:00 +01:00
drbd_req.c drbd: rcu_read_lock() and rcu_dereference() for tconn->net_conf 2012-11-08 16:48:59 +01:00
drbd_req.h drbd: Runtime changeable wire protocol 2012-11-08 16:45:18 +01:00
drbd_state.c drbd: fix thread stop deadlock 2012-11-08 16:53:00 +01:00
drbd_state.h drbd: Improved logging of state changes 2012-11-08 16:45:06 +01:00
drbd_strings.c drbd: Allow volumes to become primary only on one side 2012-11-04 00:16:31 +01:00
drbd_vli.h Fix common misspellings 2011-03-31 11:26:23 -03:00
drbd_worker.c drbd: fix thread stop deadlock 2012-11-08 16:53:00 +01:00
drbd_wrappers.h drbd: Remove obsolete drbd_crypto_is_hash() 2012-11-08 16:52:58 +01:00