dif: Enable fast forward from the middle of the iovec array

Previously _iov_iter_fast_forward can fast forward only from the
start of the iovec array. This patch enables fast forward in the
middle of the iovec array.

Change-Id: I801fc46dec3c759e1d754042abe15e7100cbdc17
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453734
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-05-15 09:39:08 +09:00 committed by Jim Harris
parent 1c468a0f66
commit 5027579f67

View File

@ -89,7 +89,7 @@ _dif_sgl_get_buf(struct _dif_sgl *s, void **_buf, uint32_t *_buf_len)
static void
_dif_sgl_fast_forward(struct _dif_sgl *s, uint32_t offset)
{
s->iov_offset = offset;
s->iov_offset += offset;
while (s->iovcnt != 0) {
if (s->iov_offset < s->iov->iov_len) {
break;