Skip to content
Commit f0703040 authored by Takahiro Yasui's avatar Takahiro Yasui Committed by Alasdair G Kergon
Browse files

dm raid1: fix deadlock when suspending failed device



To prevent deadlock, bios in the hold list should be flushed before
dm_rh_stop_recovery() is called in mirror_suspend().

The recovery can't start because there are pending bios and therefore
dm_rh_stop_recovery deadlocks.

When there are pending bios in the hold list, the recovery waits for
the completion of the bios after recovery_count is acquired.
The recovery_count is released when the recovery finished, however,
the bios in the hold list are processed after dm_rh_stop_recovery() in
mirror_presuspend(). dm_rh_stop_recovery() also acquires recovery_count,
then deadlock occurs.

Signed-off-by: default avatarTakahiro Yasui <tyasui@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
Reviewed-by: default avatarMikulas Patocka <mpatocka@redhat.com>
parent 924e600d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment