]> git.karo-electronics.de Git - linux-beck.git/commit
drbd: Fixed a deadlock, probably only affected UP machines
authorPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 23 Jun 2010 09:20:05 +0000 (11:20 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 14 Oct 2010 13:04:46 +0000 (15:04 +0200)
commit84dfb9f564208a0331131d1ab922382c7d61a553
tree1506d6c318afa4a94b13bab6af983031eac5e3cd
parent65d922c33ebd359db25d5846929b2eafc4238fcc
drbd: Fixed a deadlock, probably only affected UP machines

After disconnect (most likely mdev->net_cnt == 0) and we are
still in an unstable state (!drbd_state_is_stable()). When we
get an IO request in drbd_get_max_buffers() (called from
__inc_ap_bio_cond(), called from inc_ap_bio()) we wake up
misc_wait. Misc_wait is also used in inc_ap_bio() to sleep
until the outcome of __inc_ap_bio_cond() changes. => Busy loop!

Solution: Have a dedicated wait queue for get_net_conf() and
put_net_conf().

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_receiver.c