Re: [PATCH 02/11] scsi: add scsi_host_flush_commands() helper

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

 



On 11/20/19 5:19 PM, Bart Van Assche wrote:
> On 11/20/19 2:31 AM, Hannes Reinecke wrote:
>> +static bool flush_cmds_iter(struct request *rq, void *data, bool
>> reserved)
>> +{
>> +    struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(rq);
>> +    int status = *(int *)data;
>> +
>> +    if (reserved)
>> +        return true;
> 
> Since the SCSI core does not support reserving tags, this early return
> is dead code. Additionally, I'm not sure this early return would be
> correct if reserved tag support would be added to the SCSI core. How
> about leaving out this early return?
> 
Yeah, all right.

>> +    scsi_dma_unmap(scmd);
>> +    scmd->result = status << 16;
>> +    scmd->scsi_done(scmd);
>> +    return true;
>> +}
>> +
>> +/**
>> + * scsi_host_flush_commands -- Terminate all running commands
>                                ^^
> Should this have been a single hyphen?
> 
Maybe.

Will be sending an updated version.

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