aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-09-12 21:00:41 +0200
committerKevin Wolf <kwolf@redhat.com>2016-09-29 14:13:39 +0200
commit692e01a27ccde4120f1371227d4011f668d67a76 (patch)
tree32ef526625045cb846dfd87d29bec729d266a9b3 /blockdev.c
parent0a4279d97c501254f6164b8abcd89055a11e2dc5 (diff)
block: Parse 'detect-zeroes' in bdrv_open_common()
Amongst others, this means that you can now use the 'detect-zeroes' option for non-top-level nodes in blockdev-add, like the QAPI schema promises. 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 'blockdev.c')
-rw-r--r--blockdev.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/blockdev.c b/blockdev.c
index 7820f42210..511260ce93 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -658,7 +658,6 @@ static BlockDriverState *bds_tree_init(QDict *bs_opts, Error **errp)
BlockDriverState *bs;
QemuOpts *opts;
Error *local_error = NULL;
- BlockdevDetectZeroesOptions detect_zeroes;
int bdrv_flags = 0;
opts = qemu_opts_create(&qemu_root_bds_opts, NULL, 1, errp);
@@ -673,7 +672,7 @@ static BlockDriverState *bds_tree_init(QDict *bs_opts, Error **errp)
}
extract_common_blockdev_options(opts, &bdrv_flags, NULL, NULL,
- &detect_zeroes, &local_error);
+ NULL, &local_error);
if (local_error) {
error_propagate(errp, local_error);
goto fail;
@@ -695,8 +694,6 @@ static BlockDriverState *bds_tree_init(QDict *bs_opts, Error **errp)
goto fail_no_bs_opts;
}
- bs->detect_zeroes = detect_zeroes;
-
fail_no_bs_opts:
qemu_opts_del(opts);
return bs;
@@ -4136,10 +4133,6 @@ static QemuOptsList qemu_root_bds_opts = {
.name = "copy-on-read",
.type = QEMU_OPT_BOOL,
.help = "copy read data from backing file into image file",
- },{
- .name = "detect-zeroes",
- .type = QEMU_OPT_STRING,
- .help = "try to optimize zero writes (off, on, unmap)",
},
{ /* end of list */ }
},