From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Subject: [PATCHv3 08/10] scsi: allocate reserved commands Date: Tue, 21 Feb 2017 13:27:07 +0100 Message-ID: <1487680029-3701-9-git-send-email-hare@suse.de> References: <1487680029-3701-1-git-send-email-hare@suse.de> Return-path: Received: from mx2.suse.de ([195.135.220.15]:58942 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752195AbdBUM10 (ORCPT ); Tue, 21 Feb 2017 07:27:26 -0500 In-Reply-To: <1487680029-3701-1-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: "Martin K. Petersen" Cc: Christoph Hellwig , James Bottomley , linux-scsi@vger.kernel.org, Sreekanth Reddy , Kashyap Desai , Sathya Prakash , Hannes Reinecke , Hannes Reinecke The block layer already has the notion of 'reserved' commands, so we should be enabling scsi hosts to allocate them. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c | 1 + include/scsi/scsi_host.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index c35b6de..9d6aed5 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2129,6 +2129,7 @@ int scsi_mq_setup_tags(struct Scsi_Host *shost) shost->tag_set.ops = &scsi_mq_ops; shost->tag_set.nr_hw_queues = shost->nr_hw_queues ? : 1; shost->tag_set.queue_depth = shost->can_queue; + shost->tag_set.reserved_tags = shost->reserved_cmds; 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; diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 36680f1..cc83dd6 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -622,6 +622,7 @@ struct Scsi_Host { int this_id; int can_queue; + int reserved_cmds; short cmd_per_lun; short unsigned int sg_tablesize; short unsigned int sg_prot_tablesize; -- 1.8.5.6