aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-10-06 07:06:48 -0700
committerRichard Henderson <richard.henderson@linaro.org>2021-10-06 07:06:48 -0700
commit5564f068162d67584a8c35e1efcc051483b9077d (patch)
treec0e5fe98c0bddcf2e9efeb0e62d14d9dd59481a6 /include
parente3acc2c1961cbe22ca474cd5da4163b7bbf7cea3 (diff)
parent3765315d4c84f9c0799744f43a314169baaccc05 (diff)
downloadqemu-5564f068162d67584a8c35e1efcc051483b9077d.zip
qemu-5564f068162d67584a8c35e1efcc051483b9077d.tar.gz
qemu-5564f068162d67584a8c35e1efcc051483b9077d.tar.bz2
Merge remote-tracking branch 'remotes/kwolf/tags/for-upstream' into staging
Block layer patches - Fix I/O errors because of incorrectly detected max_iov - Fix not white-listed copy-before-write - qemu-storage-daemon: Only display FUSE help when FUSE is built-in - iotests: update environment and linting configuration # gpg: Signature made Wed 06 Oct 2021 03:58:10 AM PDT # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kwolf@redhat.com" # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] * remotes/kwolf/tags/for-upstream: iotests: Update for pylint 2.11.1 iotests/migrate-bitmaps-test: delint iotests/mirror-top-perms: Adjust imports iotests/linters: check mypy files all at once iotests: add 'qemu' package location to PYTHONPATH in testenv block: introduce max_hw_iov for use in scsi-generic iotests/image-fleecing: declare requirement of copy-before-write block: bdrv_insert_node(): don't use bdrv_open() block: bdrv_insert_node(): doc and style block: bdrv_insert_node(): fix and improve error handling block: implement bdrv_new_open_driver_opts() qemu-storage-daemon: Only display FUSE help when FUSE is built-in include/block.h: remove outdated comment Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/block/block.h8
-rw-r--r--include/block/block_int.h7
-rw-r--r--include/sysemu/block-backend.h1
3 files changed, 13 insertions, 3 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 740038a..e5dd22b 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -383,6 +383,10 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options,
const char *bdref_key, Error **errp);
BlockDriverState *bdrv_open(const char *filename, const char *reference,
QDict *options, int flags, Error **errp);
+BlockDriverState *bdrv_new_open_driver_opts(BlockDriver *drv,
+ const char *node_name,
+ QDict *options, int flags,
+ Error **errp);
BlockDriverState *bdrv_new_open_driver(BlockDriver *drv, const char *node_name,
int flags, Error **errp);
BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,
@@ -751,9 +755,7 @@ bool bdrv_drain_poll(BlockDriverState *bs, bool recursive,
* bdrv_drained_begin:
*
* Begin a quiesced section for exclusive access to the BDS, by disabling
- * external request sources including NBD server and device model. Note that
- * this doesn't block timers or coroutines from submitting more requests, which
- * means block_job_pause is still necessary.
+ * external request sources including NBD server, block jobs, and device model.
*
* This function can be recursive.
*/
diff --git a/include/block/block_int.h b/include/block/block_int.h
index ffe8606..f4c75e8 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -718,6 +718,13 @@ typedef struct BlockLimits {
*/
uint64_t max_hw_transfer;
+ /* Maximal number of scatter/gather elements allowed by the hardware.
+ * Applies whenever transfers to the device bypass the kernel I/O
+ * scheduler, for example with SG_IO. If larger than max_iov
+ * or if zero, blk_get_max_hw_iov will fall back to max_iov.
+ */
+ int max_hw_iov;
+
/* memory alignment, in bytes so that no bounce buffer is needed */
size_t min_mem_alignment;
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 29d4fdb..82bae55 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -211,6 +211,7 @@ uint32_t blk_get_request_alignment(BlockBackend *blk);
uint32_t blk_get_max_transfer(BlockBackend *blk);
uint64_t blk_get_max_hw_transfer(BlockBackend *blk);
int blk_get_max_iov(BlockBackend *blk);
+int blk_get_max_hw_iov(BlockBackend *blk);
void blk_set_guest_block_size(BlockBackend *blk, int align);
void *blk_try_blockalign(BlockBackend *blk, size_t size);
void *blk_blockalign(BlockBackend *blk, size_t size);