target/iscsi: Use proper SGL accessors for digest computation
authorAlexei Potashnik <alexei@purestorage.com>
Tue, 21 Jul 2015 00:12:12 +0000 (17:12 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 31 Jul 2015 06:32:57 +0000 (23:32 -0700)
commitaa75679c797c0250a853e600e45368f1f9545c27
tree539af1509f3220e8f19d9aa0f47080296d8e4457
parentb6a54b8d895648d915c7e8308f3d3e6bf2505d69
target/iscsi: Use proper SGL accessors for digest computation

Current implementation assumes that all the buffers of an IO are linked
with a single SG list, which is OK because target-core is only allocating
a contigious scatterlist region.  However, this assumption is wrong for
se_cmd descriptors that want to use chaining across multiple SGL regions.

Fix this up by using proper SGL accessors for digest payload computation.

Signed-off-by: Alexei Potashnik <alexei@purestorage.com>
Cc: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c