From c1f45c19e5324e60474b46f0bb3f309128f2c46a Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Fri, 11 Jul 2008 19:50:32 -0500 Subject: [PATCH] --- yaml --- r: 106571 b: refs/heads/master c: 885ace9e2f120439043ffa1bb72a2fa1f3afc645 h: refs/heads/master i: 106569: 1ccf5b598a9aa12a90c424db3da759c118b267b4 106567: 736f92e1c5e203c8d13f7d3c00f80018878489ac v: v3 --- [refs] | 2 +- trunk/drivers/scsi/scsi.c | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 19e7277aba7e..4c686474a0aa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 786231af0a4ac6d78cef51fa7e9c3dd63f016195 +refs/heads/master: 885ace9e2f120439043ffa1bb72a2fa1f3afc645 diff --git a/trunk/drivers/scsi/scsi.c b/trunk/drivers/scsi/scsi.c index 36c92f961e15..5276e73c58fc 100644 --- a/trunk/drivers/scsi/scsi.c +++ b/trunk/drivers/scsi/scsi.c @@ -902,11 +902,20 @@ void scsi_adjust_queue_depth(struct scsi_device *sdev, int tagged, int tags) spin_lock_irqsave(sdev->request_queue->queue_lock, flags); - /* Check to see if the queue is managed by the block layer. - * If it is, and we fail to adjust the depth, exit. */ - if (blk_queue_tagged(sdev->request_queue) && - blk_queue_resize_tags(sdev->request_queue, tags) != 0) - goto out; + /* + * Check to see if the queue is managed by the block layer. + * If it is, and we fail to adjust the depth, exit. + * + * Do not resize the tag map if it is a host wide share bqt, + * because the size should be the hosts's can_queue. If there + * is more IO than the LLD's can_queue (so there are not enuogh + * tags) request_fn's host queue ready check will handle it. + */ + if (!sdev->host->bqt) { + if (blk_queue_tagged(sdev->request_queue) && + blk_queue_resize_tags(sdev->request_queue, tags) != 0) + goto out; + } sdev->queue_depth = tags; switch (tagged) {