qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

block: Remove qemu_root_bds_opts

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>

+1 -53
+1 -53
blockdev.c
··· 633 633 return NULL; 634 634 } 635 635 636 - static QemuOptsList qemu_root_bds_opts; 637 - 638 636 /* Takes the ownership of bs_opts */ 639 637 static BlockDriverState *bds_tree_init(QDict *bs_opts, Error **errp) 640 638 { 641 - BlockDriverState *bs; 642 - QemuOpts *opts; 643 - Error *local_error = NULL; 644 639 int bdrv_flags = 0; 645 640 646 - opts = qemu_opts_create(&qemu_root_bds_opts, NULL, 1, errp); 647 - if (!opts) { 648 - goto fail; 649 - } 650 - 651 - qemu_opts_absorb_qdict(opts, bs_opts, &local_error); 652 - if (local_error) { 653 - error_propagate(errp, local_error); 654 - goto fail; 655 - } 656 - 657 - extract_common_blockdev_options(opts, &bdrv_flags, NULL, NULL, 658 - NULL, &local_error); 659 - if (local_error) { 660 - error_propagate(errp, local_error); 661 - goto fail; 662 - } 663 - 664 641 /* bdrv_open() defaults to the values in bdrv_flags (for compatibility 665 642 * with other callers) rather than what we want as the real defaults. 666 643 * Apply the defaults here instead. */ ··· 672 649 bdrv_flags |= BDRV_O_INACTIVE; 673 650 } 674 651 675 - bs = bdrv_open(NULL, NULL, bs_opts, bdrv_flags, errp); 676 - if (!bs) { 677 - goto fail_no_bs_opts; 678 - } 679 - 680 - fail_no_bs_opts: 681 - qemu_opts_del(opts); 682 - return bs; 683 - 684 - fail: 685 - qemu_opts_del(opts); 686 - QDECREF(bs_opts); 687 - return NULL; 652 + return bdrv_open(NULL, NULL, bs_opts, bdrv_flags, errp); 688 653 } 689 654 690 655 void blockdev_close_all_bdrv_states(void) ··· 4094 4059 .type = QEMU_OPT_BOOL, 4095 4060 .help = "whether to account for failed I/O operations " 4096 4061 "in the statistics", 4097 - }, 4098 - { /* end of list */ } 4099 - }, 4100 - }; 4101 - 4102 - static QemuOptsList qemu_root_bds_opts = { 4103 - .name = "root-bds", 4104 - .head = QTAILQ_HEAD_INITIALIZER(qemu_root_bds_opts.head), 4105 - .desc = { 4106 - { 4107 - .name = "aio", 4108 - .type = QEMU_OPT_STRING, 4109 - .help = "host AIO implementation (threads, native)", 4110 - },{ 4111 - .name = "copy-on-read", 4112 - .type = QEMU_OPT_BOOL, 4113 - .help = "copy read data from backing file into image file", 4114 4062 }, 4115 4063 { /* end of list */ } 4116 4064 },