diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-03-30 13:43:04 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-03-30 13:43:05 +0100 |
commit | b9c27e7ae6fb1387eafe858d8378ff14cd1c5b89 (patch) | |
tree | 5a66308f776272b19396a47005f5e6438047c8bc /include/block/block_int.h | |
parent | 8850dcbfd7664fab86ab49d9c27b6fa700d71618 (diff) | |
parent | f4e732a0a773c4e44c2c183a5d63cd850ffb57d1 (diff) |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches
# gpg: Signature made Wed 30 Mar 2016 11:57:54 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
* remotes/kevin/tags/for-upstream: (48 commits)
iotests: Test qemu-img convert -S 0 behavior
block/null-{co,aio}: Implement get_block_status()
block/null-{co,aio}: Allow reading zeroes
qemu-img: Fix preallocation with -S 0 for convert
block: Remove bdrv_(set_)enable_write_cache()
block: Remove BDRV_O_CACHE_WB
block: Remove bdrv_parse_cache_flags()
qemu-io: Use bdrv_parse_cache_mode() in reopen_f()
block: Use bdrv_parse_cache_mode() in drive_init()
raw: Support BDRV_REQ_FUA
nbd: Support BDRV_REQ_FUA
iscsi: Support BDRV_REQ_FUA
block: Introduce bdrv_co_writev_flags()
block/qapi: Use blk_enable_write_cache()
block: Move enable_write_cache to BB level
block: Handle flush error in bdrv_pwrite_sync()
block: Always set writeback mode in blk_new_open()
block: blockdev_init(): Call blk_set_enable_write_cache() explicitly
xen_disk: Call blk_set_enable_write_cache() explicitly
qemu-img: Call blk_set_enable_write_cache() explicitly
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/block/block_int.h')
-rw-r--r-- | include/block/block_int.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index ba6e9ac696..10d87595be 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -155,6 +155,11 @@ struct BlockDriver { int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); 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); + + int supported_write_flags; + /* * Efficiently zero a region of the disk image. Typically an image format * would use a compact metadata representation to implement this. This @@ -176,6 +181,13 @@ struct BlockDriver { int (*bdrv_inactivate)(BlockDriverState *bs); /* + * Flushes all data for all layers by calling bdrv_co_flush for underlying + * layers, if needed. This function is needed for deterministic + * synchronization of the flush finishing callback. + */ + int coroutine_fn (*bdrv_co_flush)(BlockDriverState *bs); + + /* * Flushes all data that was already written to the OS all the way down to * the disk (for example raw-posix calls fsync()). */ @@ -435,9 +447,6 @@ struct BlockDriverState { /* Alignment requirement for offset/length of I/O requests */ unsigned int request_alignment; - /* do we need to tell the quest if we have a volatile write cache? */ - int enable_write_cache; - /* the following member gives a name to every node on the bs graph. */ char node_name[32]; /* element of the list of named nodes building the graph */ @@ -704,8 +713,6 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs, const BdrvChildRole *child_role); void bdrv_root_unref_child(BdrvChild *child); -void blk_set_bs(BlockBackend *blk, BlockDriverState *bs); - void blk_dev_change_media_cb(BlockBackend *blk, bool load); bool blk_dev_has_removable_media(BlockBackend *blk); bool blk_dev_has_tray(BlockBackend *blk); |