From 9663f843954d6feab40e4dd720dc09a321e83ce8 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Wed, 20 Sep 2017 15:02:09 +0200 Subject: [PATCH] bdev: added iovs to bdev_io->unmap & flush This is a mid-step towards unifying all direct bdev_io types. Change-Id: Ie4da108f2710891e503eb0863148d8fa182d44ee Signed-off-by: Dariusz Stojaczyk Reviewed-on: https://review.gerrithub.io/379291 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Jim Harris --- include/spdk_internal/bdev.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/spdk_internal/bdev.h b/include/spdk_internal/bdev.h index 66895ee68..10f9b8444 100644 --- a/include/spdk_internal/bdev.h +++ b/include/spdk_internal/bdev.h @@ -305,6 +305,15 @@ struct spdk_bdev_io { uint64_t offset_blocks; } write; struct { + /** For basic write case, use our own iovec element */ + struct iovec iov; + + /** For SG buffer cases, array of iovecs to transfer. */ + struct iovec *iovs; + + /** For SG buffer cases, number of iovecs in iovec array. */ + int iovcnt; + /** Total size of region to be unmapped. */ uint64_t num_blocks; @@ -312,6 +321,15 @@ struct spdk_bdev_io { uint64_t offset_blocks; } unmap; struct { + /** For basic write case, use our own iovec element */ + struct iovec iov; + + /** For SG buffer cases, array of iovecs to transfer. */ + struct iovec *iovs; + + /** For SG buffer cases, number of iovecs in iovec array. */ + int iovcnt; + /** Represents the number of blocks to be flushed, starting at offset_blocks. */ uint64_t num_blocks;