diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2018-02-02 23:13:19 +0100 |
---|---|---|
committer | Shaohua Li <sh.li@alibaba-inc.com> | 2018-02-18 10:11:59 -0800 |
commit | 4b6c1060eaa6495aa5b0032e8f2d51dd936b1257 (patch) | |
tree | 6060f030df613e4b68d18bc6c150bdfa02077444 /drivers/md/raid10.h | |
parent | b126194cbb799f9980b92a77e58db6ad794c8082 (diff) | |
download | linux-4b6c1060eaa6495aa5b0032e8f2d51dd936b1257.tar.gz linux-4b6c1060eaa6495aa5b0032e8f2d51dd936b1257.tar.bz2 linux-4b6c1060eaa6495aa5b0032e8f2d51dd936b1257.zip |
md: fix md_write_start() deadlock w/o metadata devices
If no metadata devices are configured on raid1/4/5/6/10
(e.g. via dm-raid), md_write_start() unconditionally waits
for superblocks to be written thus deadlocking.
Fix introduces mddev->has_superblocks bool, defines it in md_run()
and checks for it in md_write_start() to conditionally avoid waiting.
Once on it, check for non-existing superblocks in md_super_write().
Link: https://bugzilla.kernel.org/show_bug.cgi?id=198647
Fixes: cc27b0c78c796 ("md: fix deadlock between mddev_suspend() and md_write_start()")
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Shaohua Li <sh.li@alibaba-inc.com>
Diffstat (limited to 'drivers/md/raid10.h')
0 files changed, 0 insertions, 0 deletions