Message ID | 20190531022801.10003-4-ming.lei@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | blk-mq/scsi: convert private reply queue into blk_mq hw queue | expand |
On 5/31/19 4:27 AM, Ming Lei wrote: > From: Hannes Reinecke <hare@suse.com> > > Add a host template flag 'host_tagset' so hostwide tagset can be > shared on multiple reply queues after the SCSI device's reply queue > is converted to blk-mq hw queue. > > Signed-off-by: Ming Lei <ming.lei@redhat.com> > --- > drivers/scsi/scsi_lib.c | 2 ++ > include/scsi/scsi_host.h | 3 +++ > 2 files changed, 5 insertions(+) > (Do I need to review my own patch?) Anyway. Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 65d0a10c76ad..2397947ed9fc 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1834,6 +1834,8 @@ int scsi_mq_setup_tags(struct Scsi_Host *shost) shost->tag_set.flags = BLK_MQ_F_SHOULD_MERGE; shost->tag_set.flags |= BLK_ALLOC_POLICY_TO_MQ_FLAG(shost->hostt->tag_alloc_policy); + if (shost->hostt->host_tagset) + shost->tag_set.flags |= BLK_MQ_F_HOST_TAGS; shost->tag_set.driver_data = shost; return blk_mq_alloc_tag_set(&shost->tag_set); diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index a5fcdad4a03e..48bb7a666be6 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -428,6 +428,9 @@ struct scsi_host_template { /* True if the low-level driver supports blk-mq only */ unsigned force_blk_mq:1; + /* True if the host uses host-wide tagspace */ + unsigned host_tagset:1; + /* * Countdown for host blocking with no commands outstanding. */