Commit 9b61764b authored by Jens Axboe's avatar Jens Axboe

[SG] Update block layer to use sg helpers

Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 82f66fbe
...@@ -1354,8 +1354,9 @@ new_segment: ...@@ -1354,8 +1354,9 @@ new_segment:
else else
sg = sg_next(sg); sg = sg_next(sg);
memset(sg, 0, sizeof(*sg)); sg_dma_len(sg) = 0;
sg->page = bvec->bv_page; sg_dma_address(sg) = 0;
sg_set_page(sg, bvec->bv_page);
sg->length = nbytes; sg->length = nbytes;
sg->offset = bvec->bv_offset; sg->offset = bvec->bv_offset;
nsegs++; nsegs++;
...@@ -1363,6 +1364,9 @@ new_segment: ...@@ -1363,6 +1364,9 @@ new_segment:
bvprv = bvec; bvprv = bvec;
} /* segments in rq */ } /* segments in rq */
if (sg)
__sg_mark_end(sg);
return nsegs; return nsegs;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment