Skip to content
Commit b7191253 authored by Nicholas Bellinger's avatar Nicholas Bellinger
Browse files

target: Reset data_length for COMPARE_AND_WRITE to NoLB * block_size



This patch resets se_cmd->data_length for COMPARE_AND_WRITE emulation
within sbc_compare_and_write() to NoLB * block_size in order to address
a bug with FILEIO backends where a I/O failure will occur when data_length
does not match the I/O size being actually dispatched for the individual
per block READs + WRITEs.

This is done late enough in sbc_compare_and_write() after the memory
allocations have occured in transport_generic_new_cmd() to not cause
any unwanted side-effects.

Reported-by: default avatarThomas Glanzmann <thomas@glanzmann.de>
Tested-by: default avatarThomas Glanzmann <thomas@glanzmann.de>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent c807f643
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment