]> git.baikalelectronics.ru Git - kernel.git/commit
dm raid: fix deadlock caused by premature md_stop_writes()
authorHeinz Mauelshagen <heinzm@redhat.com>
Sat, 2 Dec 2017 00:03:48 +0000 (01:03 +0100)
committerMike Snitzer <snitzer@redhat.com>
Fri, 8 Dec 2017 15:59:57 +0000 (10:59 -0500)
commit48debc44f710e59dc6805899c748c3fbd91a7d47
tree4bb8d524f6500ca96f08061268e86cfe6b4b1b3b
parente7b8ed78e990b0a6a85de86f7b98ad2603306d12
dm raid: fix deadlock caused by premature md_stop_writes()

md_stop_writes() is called in raid_presuspend() causing deadlocks on
bios submitted afterwards -- which happens on loaded raid sets with
conversion requests.

Fix by moving md_stop_writes() to raid_postsuspend().  NOTE: when the
recovery's frozen (MD_RECOVERY_FROZEN), writes haven't been started (or
are already stopped) so don't stop them again.

Also remove superfluous readonly setting.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c