Re: [PATCH v2] scsi: Fix scsi_get/set_resid() interface

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

 



On 2019/11/05 14:19, Martin K. Petersen wrote:
> 
> Damien,
> 
>> The SG driver can make use of this field to keep the io header resid
>> as an int, with negative values indicating overflows and positive
>> values underflows.
> 
> I am all for synthesizing what SG returns to userland.
> 
> That is also the case in the context of Hannes' SCSI result revamp. I
> would much prefer to have well-defined and consistent internal kernel
> status fields and then transmogrify those into something compatible with
> what userland applications might expect. As opposed to perpetuating the
> train wreck that is the current scsi_cmnd result.

OK. But just to clarify, do you mean changing struct scsi_request
resid_len field to an int and considering positive values of it as
underflow and negative values as overflow ? Or keeping resid_len as an
unsigned int and adding a flag specifying if the value means underflow
or overflow ?

I am rely surprised that my simple patch resulted in such a big
discussion. But if that leads to code improvements, then let's drop it
and work on a new series !


-- 
Damien Le Moal
Western Digital Research




[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