Skip to content

Commit 2f31115

Browse files
Ming Leimartinkpetersen
authored andcommitted
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 <osandov@fb.com>, Cc: "Martin K. Petersen" <martin.petersen@oracle.com>, Cc: James Bottomley <james.bottomley@hansenpartnership.com>, Cc: Christoph Hellwig <hch@lst.de>, Cc: Don Brace <don.brace@microsemi.com> Cc: Kashyap Desai <kashyap.desai@broadcom.com> Cc: Mike Snitzer <snitzer@redhat.com> Cc: Laurence Oberman <loberman@redhat.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent adbe552 commit 2f31115

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/scsi/hosts.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
474474
shost->dma_boundary = 0xffffffff;
475475

476476
shost->use_blk_mq = scsi_use_blk_mq;
477+
shost->use_blk_mq = scsi_use_blk_mq || shost->hostt->force_blk_mq;
477478

478479
device_initialize(&shost->shost_gendev);
479480
dev_set_name(&shost->shost_gendev, "host%d", shost->host_no);

include/scsi/scsi_host.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,9 @@ struct scsi_host_template {
452452
/* True if the controller does not support WRITE SAME */
453453
unsigned no_write_same:1;
454454

455+
/* True if the low-level driver supports blk-mq only */
456+
unsigned force_blk_mq:1;
457+
455458
/*
456459
* Countdown for host blocking with no commands outstanding.
457460
*/

0 commit comments

Comments
 (0)