diff options
author | Roland Dreier <roland@purestorage.com> | 2012-02-15 00:30:31 +0100 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-02-25 23:37:50 +0100 |
commit | 6cf3fa6918baab0c447f1206f1cef9166ad04864 (patch) | |
tree | 9613aaaa51fd6082f31f2d45f707b54e01128dc9 /kernel/cred.c | |
parent | target: Untangle front-end and back-end meanings of max_sectors attribute (diff) | |
download | linux-6cf3fa6918baab0c447f1206f1cef9166ad04864.tar.xz linux-6cf3fa6918baab0c447f1206f1cef9166ad04864.zip |
tcm_loop: Set residual field for SCSI commands
If the target core signals an over- or under-run, tcm_loop should call
scsi_set_resid() to tell the SCSI midlayer about the residual data length.
The difference can be seen by doing something like
strace -eioctl sg_raw -r 1024 /dev/sda 8 0 0 0 1 0 > /dev/null
and looking at the "resid=" part of the SG_IO ioctl -- after this patch,
the field is correctly reported as 512.
Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'kernel/cred.c')
0 files changed, 0 insertions, 0 deletions