As discussed in a thread on this list titled: "RFC: short reads on block devices" this patch provides additional information associated with a medium error. And that is that the data-in buffer contains no valid data. This patch is against lk 2.6.36 Changelog: set resid to the requested data-in length when a MEDIUM ERROR is simulated. This implies no valid data is returned in the data-in buffer Signed-off-by: Douglas Gilbert