diff options
| author | Kevin Wolf | 2016-09-12 19:08:31 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2016-09-29 14:13:39 +0200 |
| commit | b85114f8cfbede8b153db68875973ef0790bf296 (patch) | |
| tree | f145eb5c7d45e3e2ad8eefb5c06ac5bf72d20883 /include | |
| parent | block: Parse 'detect-zeroes' in bdrv_open_common() (diff) | |
| download | qemu-b85114f8cfbede8b153db68875973ef0790bf296.tar.gz qemu-b85114f8cfbede8b153db68875973ef0790bf296.tar.xz qemu-b85114f8cfbede8b153db68875973ef0790bf296.zip | |
block: Use 'detect-zeroes' option for 'blockdev-change-medium'
Instead of modifying the new BDS after it has been opened, use the newly
supported 'detect-zeroes' option in bdrv_open_common() so that all
requirements are checked (detect-zeroes=unmap requires discard=unmap).
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sysemu/block-backend.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 24d1d85399..a7993afcda 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -198,7 +198,7 @@ void blk_io_unplug(BlockBackend *blk); BlockAcctStats *blk_get_stats(BlockBackend *blk); BlockBackendRootState *blk_get_root_state(BlockBackend *blk); void blk_update_root_state(BlockBackend *blk); -void blk_apply_root_state(BlockBackend *blk, BlockDriverState *bs); +bool blk_get_detect_zeroes_from_root_state(BlockBackend *blk); int blk_get_open_flags_from_root_state(BlockBackend *blk); void *blk_aio_get(const AIOCBInfo *aiocb_info, BlockBackend *blk, |
