From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 11/18] block: Remove qemu_root_bds_opts
Date: Tue, 27 Sep 2016 15:53:54 +0200 [thread overview]
Message-ID: <1474984441-28516-12-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1474984441-28516-1-git-send-email-kwolf@redhat.com>
The remaining options in qemu_root_bds_opts (aio and copy-on-read)
aren't used any more, the QAPI schema doesn't contain them. Therefore
all the code processing qemu_root_bds_opts options is dead and can be
removed.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
blockdev.c | 54 +-----------------------------------------------------
1 file changed, 1 insertion(+), 53 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index e2ace04..07ec733 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -633,34 +633,11 @@ err_no_opts:
return NULL;
}
-static QemuOptsList qemu_root_bds_opts;
-
/* Takes the ownership of bs_opts */
static BlockDriverState *bds_tree_init(QDict *bs_opts, Error **errp)
{
- BlockDriverState *bs;
- QemuOpts *opts;
- Error *local_error = NULL;
int bdrv_flags = 0;
- opts = qemu_opts_create(&qemu_root_bds_opts, NULL, 1, errp);
- if (!opts) {
- goto fail;
- }
-
- qemu_opts_absorb_qdict(opts, bs_opts, &local_error);
- if (local_error) {
- error_propagate(errp, local_error);
- goto fail;
- }
-
- extract_common_blockdev_options(opts, &bdrv_flags, NULL, NULL,
- NULL, &local_error);
- if (local_error) {
- error_propagate(errp, local_error);
- goto fail;
- }
-
/* bdrv_open() defaults to the values in bdrv_flags (for compatibility
* with other callers) rather than what we want as the real defaults.
* Apply the defaults here instead. */
@@ -672,19 +649,7 @@ static BlockDriverState *bds_tree_init(QDict *bs_opts, Error **errp)
bdrv_flags |= BDRV_O_INACTIVE;
}
- bs = bdrv_open(NULL, NULL, bs_opts, bdrv_flags, errp);
- if (!bs) {
- goto fail_no_bs_opts;
- }
-
-fail_no_bs_opts:
- qemu_opts_del(opts);
- return bs;
-
-fail:
- qemu_opts_del(opts);
- QDECREF(bs_opts);
- return NULL;
+ return bdrv_open(NULL, NULL, bs_opts, bdrv_flags, errp);
}
void blockdev_close_all_bdrv_states(void)
@@ -4099,23 +4064,6 @@ QemuOptsList qemu_common_drive_opts = {
},
};
-static QemuOptsList qemu_root_bds_opts = {
- .name = "root-bds",
- .head = QTAILQ_HEAD_INITIALIZER(qemu_root_bds_opts.head),
- .desc = {
- {
- .name = "aio",
- .type = QEMU_OPT_STRING,
- .help = "host AIO implementation (threads, native)",
- },{
- .name = "copy-on-read",
- .type = QEMU_OPT_BOOL,
- .help = "copy read data from backing file into image file",
- },
- { /* end of list */ }
- },
-};
-
QemuOptsList qemu_drive_opts = {
.name = "drive",
.head = QTAILQ_HEAD_INITIALIZER(qemu_drive_opts.head),
--
1.8.3.1
next prev parent reply other threads:[~2016-09-27 13:54 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 13:53 [Qemu-devel] [PULL 00/18] Block layer patches Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 01/18] block: reintroduce bdrv_flush_all Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 02/18] qemu: use bdrv_flush_all for vm_stop et al Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 03/18] block-backend: remove blk_flush_all Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 04/18] block: Fix error path in qmp_blockdev_change_medium() Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 05/18] block: Drop aio/cache consistency check from qmp_blockdev_add() Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 06/18] block/qapi: Use separate options type for curl driver Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 07/18] block/qapi: Move 'aio' option to file driver Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 08/18] block: Parse 'detect-zeroes' in bdrv_open_common() Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 09/18] block: Use 'detect-zeroes' option for 'blockdev-change-medium' Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 10/18] block: Move 'discard' option to bdrv_open_common() Kevin Wolf
2016-10-07 9:01 ` Gerd Hoffmann
2016-10-07 10:20 ` Kevin Wolf
2016-09-27 13:53 ` Kevin Wolf [this message]
2016-09-27 13:53 ` [Qemu-devel] [PULL 12/18] oslib-posix: add helpers for stack alloc and free Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 13/18] coroutine-sigaltstack: rename coroutine struct appropriately Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 14/18] coroutine: add a macro for the coroutine stack size Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 15/18] coroutine-ucontext: use helper for allocating stack memory Kevin Wolf
2016-09-27 13:53 ` [Qemu-devel] [PULL 16/18] coroutine-sigaltstack: " Kevin Wolf
2016-09-27 13:54 ` [Qemu-devel] [PULL 17/18] oslib-posix: add a configure switch to debug stack usage Kevin Wolf
2016-09-27 13:54 ` [Qemu-devel] [PULL 18/18] coroutine: reduce stack size to 60kB Kevin Wolf
2016-09-27 19:42 ` [Qemu-devel] [PULL 00/18] Block layer patches Peter Maydell
2016-09-28 9:37 ` Kevin Wolf
2016-09-28 14:52 ` Peter Maydell
2016-09-28 19:03 ` Peter Maydell
2016-09-29 10:25 ` Kevin Wolf
2016-09-29 17:02 ` John Snow
2016-09-29 18:17 ` Paolo Bonzini
2016-09-29 18:19 ` John Snow
2016-09-29 17:18 ` Peter Maydell
2016-09-29 18:19 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474984441-28516-12-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.