@@ -2193,6 +2193,8 @@ int scsi_mq_setup_tags(struct Scsi_Host *shost)
shost->tag_set.cmd_size = cmd_size;
shost->tag_set.numa_node = NUMA_NO_NODE;
shost->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_SG_MERGE;
+ if (shost->hostt->host_tagset)
+ shost->tag_set.flags |= BLK_MQ_F_GLOBAL_TAGS;
shost->tag_set.flags |=
BLK_ALLOC_POLICY_TO_MQ_FLAG(shost->hostt->tag_alloc_policy);
shost->tag_set.driver_data = shost;
@@ -457,6 +457,11 @@ struct scsi_host_template {
unsigned no_async_abort:1;
/*
+ * True if the host supports a host-wide tagspace
+ */
+ unsigned host_tagset:1;
+
+ /*
* Countdown for host blocking with no commands outstanding.
*/
unsigned int max_host_blocked;
Add a host template flag 'host_tagset' to enable the use of a global tagmap for block-mq. Signed-off-by: Hannes Reinecke <hare@suse.com> --- drivers/scsi/scsi_lib.c | 2 ++ include/scsi/scsi_host.h | 5 +++++ 2 files changed, 7 insertions(+)