diff options
author | Ming Lei <[email protected]> | 2018-03-13 17:42:41 +0800 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2018-03-14 23:31:13 -0400 |
commit | 2f31115e940c4afd49b99c33123534e2ac924ffb (patch) | |
tree | 34813dcad7d2ab489a0f3e02b15f852c6182f09d | |
parent | adbe552349f2d1e48357a00e564d26135e586634 (diff) |
scsi: core: introduce force_blk_mq
This patch introduces 'force_blk_mq' to the scsi_host_template so that
drivers that have no desire to support the legacy I/O path can signal
blk-mq only support.
[mkp: commit desc]
Cc: Omar Sandoval <[email protected]>,
Cc: "Martin K. Petersen" <[email protected]>,
Cc: James Bottomley <[email protected]>,
Cc: Christoph Hellwig <[email protected]>,
Cc: Don Brace <[email protected]>
Cc: Kashyap Desai <[email protected]>
Cc: Mike Snitzer <[email protected]>
Cc: Laurence Oberman <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r-- | drivers/scsi/hosts.c | 1 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index dd9464920456..ef22b275d050 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -474,6 +474,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) shost->dma_boundary = 0xffffffff; shost->use_blk_mq = scsi_use_blk_mq; + shost->use_blk_mq = scsi_use_blk_mq || shost->hostt->force_blk_mq; device_initialize(&shost->shost_gendev); dev_set_name(&shost->shost_gendev, "host%d", shost->host_no); diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index a8b7bf879ced..9c1e4bad6581 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -452,6 +452,9 @@ struct scsi_host_template { /* True if the controller does not support WRITE SAME */ unsigned no_write_same:1; + /* True if the low-level driver supports blk-mq only */ + unsigned force_blk_mq:1; + /* * Countdown for host blocking with no commands outstanding. */ |