summaryrefslogtreecommitdiffstats
path: root/net/ipv6/xfrm6_input.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-10-17 13:46:43 +1100
committerShaohua Li <shli@fb.com>2017-11-01 21:32:20 -0700
commit35bfc52187f6df8779d0f1cebdb52b7f797baf4e (patch)
treeeebfc59fb56a7e8f794e5f68125b5bdb3d57df4c /net/ipv6/xfrm6_input.c
parent9e1cc0a54556a6c63dc0cfb7cd7d60d43337bba6 (diff)
downloadblackbird-obmc-linux-35bfc52187f6df8779d0f1cebdb52b7f797baf4e.tar.gz
blackbird-obmc-linux-35bfc52187f6df8779d0f1cebdb52b7f797baf4e.zip
md: allow metadata update while suspending.
There are various deadlocks that can occur when a thread holds reconfig_mutex and calls ->quiesce(mddev, 1). As some write request block waiting for metadata to be updated (e.g. to record device failure), and as the md thread updates the metadata while the reconfig mutex is held, holding the mutex can stop write requests completing, and this prevents ->quiesce(mddev, 1) from completing. ->quiesce() is now usually called from mddev_suspend(), and it is always called with reconfig_mutex held. So at this time it is safe for the thread to update metadata without explicitly taking the lock. So add 2 new flags, one which says the unlocked updates is allowed, and one which ways it is happening. Then allow it while the quiesce completes, and then wait for it to finish. Reported-and-tested-by: Xiao Ni <xni@redhat.com> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'net/ipv6/xfrm6_input.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud