[dm-devel] dm mpath: Fix a dm_blk_ioctl() deadlock

Mike Snitzer snitzer at redhat.com
Tue Jun 28 18:59:14 UTC 2016


On Tue, Jun 28 2016 at  2:29pm -0400,
Bart Van Assche <bart.vanassche at sandisk.com> wrote:

> On 06/28/2016 08:15 PM, Mike Snitzer wrote:
> > This patch doesn't make sense.
> > 
> > In the context of dm-mpath.c:multipath_prepare_ioctl, *bdev is only
> > valid if r == 0.  But r == -ENOTCONN so how can *bdev be valid?
> 
> Sorry but the dm code is not my area of expertise. How about the patch
> below? Please note that so far only the queue-length path selector has
> been tested.

Can we go back to what it is you've experienced?  is it that you have
'queue_if_no_path' enabled and are issuing ioctls to an mpath device
(while removing underlying paths) you'll experience a live-lock (_not_
deadlock) once no valid paths exist?

If that isn't what you're hitting then I'd like to better understand how
a request_queue that is "dying" isn't able to keep itself up enough to
fail IO issued to it (to allow normal error handling to trap the IO
failure).

Mike




More information about the dm-devel mailing list