Re: [PATCH 1/3] scsi: fix shared tag map setup

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

 



michaelc@xxxxxxxxxxx wrote:
From: Mike Christie <michaelc@xxxxxxxxxxx>

Currently qla4xxx and stex pass in their can_queue values into
scsi_activate_tcq because they wanted the tag map that large.
The problem with this is that it ends up also setting the queue
depth to that large value. All we want to do this in this case
is set the device queue depth and the other device settings.
We do not need to touch the tag map sizing because the drivers
had setup that map according to their can_queue limits when the
shared map was created.

The scsi mid layer in request_fn will then handle the case where we
have more requests than available tags when it checks the host
queue ready function.


Actually, I think this code needs one more fix to scsi_request_fn.

If we hit this in scsi_request_fn:

if (!(blk_queue_tagged(q) && !blk_queue_start_tag(q, req)))
	blkdev_dequeue_request(req);

blk_queue_tagged would be 1. blk_queue_start_tag could return 1 if we have too many commands. And then we will accidentally dequeue the request, and when we get to the host queue ready function, we could have raced with a completion which would have decreased the host_busy and so the command will be queued to the driver without a tag.

I will reroll these patches and add a fix to request_fn for this other problem and resend it all in one patchset.
--
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