From 5027579f6784fee938b93024a0a5345e976630d4 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Wed, 15 May 2019 09:39:08 +0900 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453734 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris --- lib/util/dif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/dif.c b/lib/util/dif.c index c3d323665..337aa6ed5 100644 --- a/lib/util/dif.c +++ b/lib/util/dif.c @@ -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;