+45
−11
Loading
Due to the recent changes for non block size multiples write I/O, the data digest feature was degraded. If Linux iSCSI host enables data digest and tries to detect LU from SPDK iSCSI target, data mismatch error is detected and the connection is disconnected unexpectedly. The cause was that pdu->data_valid_bytes was not set for non-write response PDUs which have a data segment. iscsi_pdu_calc_data_digest() has been used only for non-write response PDUs. Hence we did not need to change iscsi_pdu_calc_data_digest(). Restore the original implementation of iscsi_pdu_calc_data_digest(). Additionally, to avoid future degradation, rename the related functions to iscsi_pdu_calc_partial_data_digest() and iscsi_pdu_calc_partial_data_digest_done(), and add comments for clarification. This fix was verified by the reporter. Fixes #2029. Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I6babcd1b56e79d3fa3cd26b2dfaad87a52788e63 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8635 Reviewed-by:
Ziye Yang <ziye.yang@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot