[PATCH] fix queue full in scsi error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Upon event that queue is full there seems the relevant time mark
should be updated.

Tedious check for sane depth of queue is also added before issuing the
callback of LLDD.

Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---

--- a/drivers/scsi/scsi_error.c	2010-09-13 07:07:38.000000000 +0800
+++ b/drivers/scsi/scsi_error.c	2010-11-01 20:48:26.000000000 +0800
@@ -405,6 +405,7 @@ static void scsi_handle_queue_full(struc

 	if (!sht->change_queue_depth)
 		return;
+	sdev->last_queue_full_time = jiffies;

 	shost_for_each_device(tmp_sdev, sdev->host) {
 		if (tmp_sdev->channel != sdev->channel ||
@@ -415,8 +416,10 @@ static void scsi_handle_queue_full(struc
 		 * the device when we got the queue full so we start
 		 * from the highest possible value and work our way down.
 		 */
-		sht->change_queue_depth(tmp_sdev, tmp_sdev->queue_depth - 1,
-					SCSI_QDEPTH_QFULL);
+		if (tmp_sdev->queue_depth > 1)
+			sht->change_queue_depth(tmp_sdev,
+						tmp_sdev->queue_depth - 1,
+						SCSI_QDEPTH_QFULL);
 	}
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux