original_kernel/drivers/target
Roland Dreier 1765fe5edc target: Fix range calculation in WRITE SAME emulation when num blocks == 0
When NUMBER OF LOGICAL BLOCKS is 0, WRITE SAME is supposed to write
all the blocks from the specified LBA through the end of the device.
However, dev->transport->get_blocks(dev) (perhaps confusingly) returns
the last valid LBA rather than the number of blocks, so the correct
number of blocks to write starting with lba is

dev->transport->get_blocks(dev) - lba + 1

(nab: Backport roland's for-3.6 patch to for-3.5)

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-07-16 17:10:17 -07:00
..
iscsi
loopback
sbp
tcm_fc tcm_fc: Fix crash seen with aborts and large reads 2012-07-14 15:17:29 -07:00
Kconfig
Makefile
target_core_alua.c target: Return error to initiator if SET TARGET PORT GROUPS emulation fails 2012-06-12 20:12:25 -07:00
target_core_alua.h
target_core_cdb.c target: Fix range calculation in WRITE SAME emulation when num blocks == 0 2012-07-16 17:10:17 -07:00
target_core_configfs.c
target_core_device.c
target_core_fabric_configfs.c
target_core_fabric_lib.c
target_core_file.c target/file: Use O_DSYNC by default for FILEIO backends 2012-06-02 23:47:20 -07:00
target_core_file.h target/file: Use O_DSYNC by default for FILEIO backends 2012-06-02 23:47:20 -07:00
target_core_hba.c
target_core_iblock.c
target_core_iblock.h
target_core_internal.h
target_core_pr.c target: Clean up returning errors in PR handling code 2012-07-16 16:42:40 -07:00
target_core_pr.h
target_core_pscsi.c
target_core_pscsi.h
target_core_rd.c
target_core_rd.h
target_core_stat.c
target_core_tmr.c
target_core_tpg.c
target_core_transport.c target: Add TFO->put_session() caller for HW fabric session shutdown 2012-06-12 19:33:05 -07:00
target_core_ua.c
target_core_ua.h