diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-05-07 02:55:35 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-07-22 11:37:44 +0200 |
commit | dd3a5ad8e0c8706659f02c4a72b8c87f6f7ab479 (patch) | |
tree | 83e4bad30b9dcceb9f19632ffe5cf128609ad06e /drivers/target/loopback | |
parent | target: Fix WRITE_SAME_16 t_task_lba assignment bug (diff) | |
download | linux-dd3a5ad8e0c8706659f02c4a72b8c87f6f7ab479.tar.xz linux-dd3a5ad8e0c8706659f02c4a72b8c87f6f7ab479.zip |
target: Fix WRITE_SAME_[16,32] number of blocks=0 case
This patch fixes the handling of WRITE_SAME_[16,32] emulation where a
WRITE_SAME_* CDB with number of blocks=0 was being rejected by SCSI
expected data transfer length overflow checking in target core.
It changes both CDB cases in transport_generic_cmd_sequencer() to use
dev->se_sub_dev->se_dev_attrib.block_size to match what sg_write_same
is sending us with --num=0. It also fixes target_emulate_write_same()
to properly determine the num_blocks with --num=0 case to determine the
remaining range for dev->transport->do_discard().
Reported-by: Chris Greiveldinger <chris.greiveldinger@rnanetworks.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/loopback')
0 files changed, 0 insertions, 0 deletions