On 10/9/19 2:32 AM, Ming Lei wrote:
@@ -354,7 +354,8 @@ void scsi_device_unbusy(struct scsi_device *sdev, struct scsi_cmnd *cmd)
if (starget->can_queue > 0)
atomic_dec(&starget->target_busy);
- atomic_dec(&sdev->device_busy);
+ if (!blk_queue_nonrot(sdev->request_queue))
+ atomic_dec(&sdev->device_busy);
}
Hi Ming,
Does this patch impact the meaning of the queue_depth sysfs attribute
(see also sdev_store_queue_depth()) and also the queue depth ramp
up/down mechanism (see also scsi_handle_queue_ramp_up())? Have you
considered to enable/disable busy tracking per LUN depending on whether
or not sdev->queue_depth < shost->can_queue?
The megaraid and mpt3sas drivers read sdev->device_busy directly. Is the
current version of this patch compatible with these drivers?
Thanks,
Bart.