Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f271972 authored by Benjamin Marzinski's avatar Benjamin Marzinski Committed by Mike Snitzer
Browse files

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: default avatarBenjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 3d8aab2d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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) {