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

From: Tejun Heo
Date: Tue May 12 2009 - 05:17:29 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/