stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "dm table: an 'all_blk_mq' table must be loaded for a blk-mq DM device" has been added to the 4.8-stable tree
@ 2017-01-04 13:29 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-04 13:29 UTC (permalink / raw)
  To: bart.vanassche, gregkh, snitzer; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    dm table: an 'all_blk_mq' table must be loaded for a blk-mq DM device

to the 4.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dm-table-an-all_blk_mq-table-must-be-loaded-for-a-blk-mq-dm-device.patch
and it can be found in the queue-4.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 301fc3f5efb98633115bd887655b19f42c6dfaa8 Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bart.vanassche@sandisk.com>
Date: Wed, 7 Dec 2016 16:56:06 -0800
Subject: dm table: an 'all_blk_mq' table must be loaded for a blk-mq DM device

From: Bart Van Assche <bart.vanassche@sandisk.com>

commit 301fc3f5efb98633115bd887655b19f42c6dfaa8 upstream.

When dm_table_set_type() is used by a target to establish a DM table's
type (e.g. DM_TYPE_MQ_REQUEST_BASED in the case of DM multipath) the
DM core must go on to verify that the devices in the table are
compatible with the established type.

Fixes: e83068a5 ("dm mpath: add optional "queue_mode" feature")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/dm-table.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -981,6 +981,11 @@ verify_rq_based:
 		t->all_blk_mq = true;
 	}
 
+	if (t->type == DM_TYPE_MQ_REQUEST_BASED && !t->all_blk_mq) {
+		DMERR("table load rejected: all devices are not blk-mq request-stackable");
+		return -EINVAL;
+	}
+
 	return 0;
 }
 


Patches currently in stable-queue which might be from bart.vanassche@sandisk.com are

queue-4.8/dm-rq-fix-a-race-condition-in-rq_completed.patch
queue-4.8/blk-mq-do-not-invoke-.queue_rq-for-a-stopped-queue.patch
queue-4.8/dm-table-fix-all_blk_mq-inconsistency-when-an-empty-table-is-loaded.patch
queue-4.8/dm-table-an-all_blk_mq-table-must-be-loaded-for-a-blk-mq-dm-device.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-04 13:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-04 13:29 Patch "dm table: an 'all_blk_mq' table must be loaded for a blk-mq DM device" has been added to the 4.8-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).