Re: [PATCH 1/4] dpt_i2o: use midlayer tcq implementation

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

 



On 11/15/19 9:48 AM, Christoph Hellwig wrote:
> On Fri, Nov 15, 2019 at 09:05:52AM +0100, Hannes Reinecke wrote:
> static bool fail_posted_scbs_iter(struct request *rq, void *data, bool reserved)
>>  {
>> +	struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq);
>>  
>> +	cmd->result = (DID_OK << 16) | SAM_STAT_TASK_SET_FULL;
> 
> Not new in this patch, but SAM_STAT_TASK_SET_FULL seems like an odd
> error code for bouncing all commands to the mid layer after an reset.
> 
Was'ne me. Personally I would go with DID_ABORTED here,
but who am I to judge ...

>> +	cmd->scsi_done(cmd);
>> +
>> +	return true;
>> +}
>> +
>> +static void adpt_fail_posted_scbs(adpt_hba* pHba)
>> +{
>> +	blk_mq_tagset_busy_iter(&pHba->host->tag_set,
>> +				fail_posted_scbs_iter, NULL);
> 
> Should this be a scsi layer helper?  In the future it also sounds
> like we migh want to move something like this to be called from
> common code, as letting the other command posted to the hardware
> just time out after a host reset is rather silly.
> 
Sure, for the common helper.

Moving it to the common layer is probably not going to work, as some
HBAs will complete commands internally during host reset (and hence
triggering a completion), while others don't (or can't, like aacraid).

So not sure about that one.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      Teamlead Storage & Networking
hare@xxxxxxx			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer



[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