]> git.baikalelectronics.ru Git - kernel.git/commit
target: Fix WRITE_SAME usage with transport_get_size
authorNicholas Bellinger <nab@linux-iscsi.org>
Tue, 9 Aug 2011 02:08:23 +0000 (19:08 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 22 Aug 2011 19:26:22 +0000 (19:26 +0000)
commit44ac041b5a87132f9c7c06cd6e005b84ca6d64b8
tree9585f7c65f46167d5af355f49faaa49639683bf4
parent7c39b3eb7837f4d758a0bc9eda1302d45b52af70
target: Fix WRITE_SAME usage with transport_get_size

For all flavours of WRITE_SAME, we only expect to handle a single block
of data-out buffer payload, regardless of the number of logical blocks
presented in the CDB.  This patch changes all flavours of WRITE_SAME in
transport_generic_cmd_sequencer() to pass '1' into transport_get_size()
instead of the extracted 'sectors' to properly handle the default usage
of sg_write_same without the --xferlen parameter.

Reported-by: Eric Seppanen <eric@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@risingtidesystems.com>
drivers/target/target_core_transport.c