From: Benjamin Marzinski Date: Wed, 13 Aug 2014 18:53:42 +0000 (-0500) Subject: dm mpath: stop queueing IO when no valid paths exist X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f271972478d84dd9e4d6dd82f414d70ed9e78ce;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dm mpath: stop queueing IO when no valid paths exist 'queue_io' is set so that IO is queued while paths are being initialized. Clear queue_io in __choose_pgpath if there are no valid paths, since there are obviously no paths that can be initialized. Otherwise IOs to the device will back up. Signed-off-by: Benjamin Marzinski Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 833d7e752f06..7b6b0f0f831a 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -317,8 +317,10 @@ static void __choose_pgpath(struct multipath *m, size_t nr_bytes) struct priority_group *pg; unsigned bypassed = 1; - if (!m->nr_valid_paths) + if (!m->nr_valid_paths) { + m->queue_io = 0; goto failed; + } /* Were we instructed to switch PG? */ if (m->next_pg) {