diff options
author | 2012-07-16 17:10:17 -0700 | |
---|---|---|
committer | 2012-07-16 17:10:17 -0700 | |
commit | 1765fe5edcb83f53fc67edeb559fcf4bc82c6460 (patch) | |
tree | 8248c8a4f2a92b7806aca6457ddf5337464880b5 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | target: Clean up returning errors in PR handling code (diff) | |
download | wireguard-linux-1765fe5edcb83f53fc67edeb559fcf4bc82c6460.tar.xz wireguard-linux-1765fe5edcb83f53fc67edeb559fcf4bc82c6460.zip |
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>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions