Commit 90552cd2 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: core: Move the definition of SCSI_QUEUE_DELAY

Move the definition of SCSI_QUEUE_DELAY to just above the function that
uses it.

Link: https://lore.kernel.org/r/20220630195703.10155-2-bvanassche@acm.org
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: John Garry <john.garry@huawei.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent acd1a278
...@@ -75,13 +75,6 @@ int scsi_init_sense_cache(struct Scsi_Host *shost) ...@@ -75,13 +75,6 @@ int scsi_init_sense_cache(struct Scsi_Host *shost)
return ret; return ret;
} }
/*
* When to reinvoke queueing after a resource shortage. It's 3 msecs to
* not change behaviour from the previous unplug mechanism, experimentation
* may prove this needs changing.
*/
#define SCSI_QUEUE_DELAY 3
static void static void
scsi_set_blocked(struct scsi_cmnd *cmd, int reason) scsi_set_blocked(struct scsi_cmnd *cmd, int reason)
{ {
...@@ -1648,6 +1641,13 @@ static void scsi_mq_put_budget(struct request_queue *q, int budget_token) ...@@ -1648,6 +1641,13 @@ static void scsi_mq_put_budget(struct request_queue *q, int budget_token)
sbitmap_put(&sdev->budget_map, budget_token); sbitmap_put(&sdev->budget_map, budget_token);
} }
/*
* When to reinvoke queueing after a resource shortage. It's 3 msecs to
* not change behaviour from the previous unplug mechanism, experimentation
* may prove this needs changing.
*/
#define SCSI_QUEUE_DELAY 3
static int scsi_mq_get_budget(struct request_queue *q) static int scsi_mq_get_budget(struct request_queue *q)
{ {
struct scsi_device *sdev = q->queuedata; struct scsi_device *sdev = q->queuedata;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment