[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/14] block: document semantics of bdrv_co_preadv|pw
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 07/14] block: document semantics of bdrv_co_preadv|pwritev |
Date: |
Wed, 6 Sep 2017 16:02:39 +0200 |
From: "Daniel P. Berrange" <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
include/block/block_int.h | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 223801e4fb..ba4c383393 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -150,12 +150,43 @@ struct BlockDriver {
int coroutine_fn (*bdrv_co_readv)(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov);
+
+ /**
+ * @offset: position in bytes to read at
+ * @bytes: number of bytes to read
+ * @qiov: the buffers to fill with read data
+ * @flags: currently unused, always 0
+ *
+ * @offset and @bytes will be a multiple of 'request_alignment',
+ * but the length of individual @qiov elements does not have to
+ * be a multiple.
+ *
+ * @bytes will always equal the total size of @qiov, and will be
+ * no larger than 'max_transfer'.
+ *
+ * The buffer in @qiov may point directly to guest memory.
+ */
int coroutine_fn (*bdrv_co_preadv)(BlockDriverState *bs,
uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags);
int coroutine_fn (*bdrv_co_writev)(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov);
int coroutine_fn (*bdrv_co_writev_flags)(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, int flags);
+ /**
+ * @offset: position in bytes to write at
+ * @bytes: number of bytes to write
+ * @qiov: the buffers containing data to write
+ * @flags: zero or more bits allowed by 'supported_write_flags'
+ *
+ * @offset and @bytes will be a multiple of 'request_alignment',
+ * but the length of individual @qiov elements does not have to
+ * be a multiple.
+ *
+ * @bytes will always equal the total size of @qiov, and will be
+ * no larger than 'max_transfer'.
+ *
+ * The buffer in @qiov may point directly to guest memory.
+ */
int coroutine_fn (*bdrv_co_pwritev)(BlockDriverState *bs,
uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags);
--
2.13.5
- [Qemu-devel] [PULL 00/14] Block layer patches, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 02/14] block: remove unused bdrv_media_changed, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 05/14] qcow: Change signature of get_cluster_offset(), Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 03/14] block: remove bdrv_truncate callback in blkdebug, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 06/14] qcow: Check failure of bdrv_getlength() and bdrv_truncate(), Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 01/14] block: pass bdrv_* methods to bs->file by default in block filters, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 10/14] block: tidy ThrottleGroupMember initializations, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 04/14] block: add default implementations for bdrv_co_get_block_status(), Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 07/14] block: document semantics of bdrv_co_preadv|pwritev,
Kevin Wolf <=
- [Qemu-devel] [PULL 12/14] block: add throttle block filter driver, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 11/14] block: convert ThrottleGroup to object with QOM, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 08/14] block: move ThrottleGroup membership to ThrottleGroupMember, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 09/14] block: add aio_context field in ThrottleGroupMember, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 13/14] qemu-iotests: add 184 for throttle filter driver, Kevin Wolf, 2017/09/06
- [Qemu-devel] [PULL 14/14] qcow2: move qcow2_store_persistent_dirty_bitmaps() before cache flushing, Kevin Wolf, 2017/09/06
- Re: [Qemu-devel] [PULL 00/14] Block layer patches, Peter Maydell, 2017/09/07