diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-02 12:19:27 -0600 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-02 12:19:27 -0600 |
| commit | 217da7fdeb2a4c99c49f22f9dc64c8df2e3a4387 (patch) | |
| tree | 8b5e91974d20566398b3a74d08392a26c13f2141 /include/qemu/iov.h | |
| parent | 9a8a5ae69d3a436e51a7eb2edafe254572f60823 (diff) | |
| parent | d6b1ef89a1ede41334e4d0fa27e600e0b4d4f209 (diff) | |
| download | focaccia-qemu-217da7fdeb2a4c99c49f22f9dc64c8df2e3a4387.tar.gz focaccia-qemu-217da7fdeb2a4c99c49f22f9dc64c8df2e3a4387.zip | |
Merge remote-tracking branch 'stefanha/block' into staging
* stefanha/block: sheepdog: pass oid directly to send_pending_req() sheepdog: don't update inode when create_and_write fails block/raw-win32: Fix compiler warnings (wrong format specifiers) qemu-img: report size overflow error message cutils: change strtosz_suffix_unit function virtio-blk: Return UNSUPP for unknown request types virtio-blk: add x-data-plane=on|off performance feature dataplane: add virtio-blk data plane code virtio-blk: restore VirtIOBlkConf->config_wce flag iov: add qemu_iovec_concat_iov() test-iov: add iov_discard_front/back() testcases iov: add iov_discard_front/back() to remove data dataplane: add Linux AIO request queue dataplane: add event loop dataplane: add virtqueue vring code dataplane: add host memory mapping code configure: add CONFIG_VIRTIO_BLK_DATA_PLANE raw-posix: add raw_get_aio_fd() for virtio-blk-data-plane Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include/qemu/iov.h')
| -rw-r--r-- | include/qemu/iov.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/qemu/iov.h b/include/qemu/iov.h index d06f8b9ce3..68d25f29b7 100644 --- a/include/qemu/iov.h +++ b/include/qemu/iov.h @@ -99,4 +99,17 @@ unsigned iov_copy(struct iovec *dst_iov, unsigned int dst_iov_cnt, const struct iovec *iov, unsigned int iov_cnt, size_t offset, size_t bytes); +/* + * Remove a given number of bytes from the front or back of a vector. + * This may update iov and/or iov_cnt to exclude iovec elements that are + * no longer required. + * + * The number of bytes actually discarded is returned. This number may be + * smaller than requested if the vector is too small. + */ +size_t iov_discard_front(struct iovec **iov, unsigned int *iov_cnt, + size_t bytes); +size_t iov_discard_back(struct iovec *iov, unsigned int *iov_cnt, + size_t bytes); + #endif |