Re: [PATCH 03/11] block: add rq->resid_len

Tejun Heo
2009-05-12T09:17:27Z

Tejun Heo wrote:
...
> Please consider write failing after successfully writing certain
> number of bytes. A failed write command MUST NOT cause any actual
> write on the device.
>
> Residual count is not about how many bytes have been transferred. The
> number of transferred bytes itself doesn't mean a thing because it
> changes depending on which transfer protocol is used regardless of
> where the actual failure is. Residual count is about how many bytes
> have been actually produced or consumed and when a command fails none
> should have been.

Please note that in the above 'command' and 'residual count' are not
as defined in SCSI. Those terms refer to how those concepts are used
in the kernel and via SG_IO interface.

Thanks.

--
tejun