target: Fix VERIFY and WRITE VERIFY command parsing
authorBart Van Assche <bart.vanassche@sandisk.com>
Thu, 30 Mar 2017 17:12:39 +0000 (10:12 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 2 May 2017 05:20:49 +0000 (22:20 -0700)
commit0e2eb7d12eaa8e391bf5615d4271bb87a649caaa
tree8c46d9fc3db0adfcdbb17f4c6ffc811a59309704
parentd65e655706e4827fb061daff399e07806b1223ad
target: Fix VERIFY and WRITE VERIFY command parsing

Use the value of the BYTCHK field to determine the size of the
Data-Out buffer. For VERIFY, honor the VRPROTECT, DPO and FUA
fields. This patch avoids that LIO complains about a mismatch
between the expected transfer length and the SCSI CDB length
if the value of the BYTCHK field is 0.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Max Lohrmann <post@wickenrode.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_sbc.c