]> 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)
commit1e2ed6730f3394d736f4400decb7e1bc9adc65d5
tree9585f7c65f46167d5af355f49faaa49639683bf4
parentdb3c73d083956e1c0ddcf5a0f7686a225c1de1b1
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