• Bart Van Assche's avatar
    dm mpath: avoid that path removal can trigger an infinite loop · 7083abbb
    Bart Van Assche authored
    If blk_get_request() fails, check whether the failure is due to a path
    being removed.  If that is the case, fail the path by triggering a call
    to fail_path().  This avoids that the following scenario can be
    encountered while removing paths:
    * CPU usage of a kworker thread jumps to 100%.
    * Removing the DM device becomes impossible.
    
    Delay requeueing if blk_get_request() returns -EBUSY or -EWOULDBLOCK,
    and the queue is not dying, because in these cases immediate requeuing
    is inappropriate.
    Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
    Cc: Hannes Reinecke <hare@suse.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    7083abbb
dm-mpath.c 49.3 KB