]> git.proxmox.com Git - mirror_qemu.git/commit
block: Update bs->options if bdrv_reopen() succeeds
authorAlberto Garcia <berto@igalia.com>
Fri, 29 Jun 2018 11:37:02 +0000 (14:37 +0300)
committerKevin Wolf <kwolf@redhat.com>
Wed, 15 Aug 2018 10:50:39 +0000 (12:50 +0200)
commit4c8350fe1729b072473417dc22fa6410a4383127
treefa0ea6ac45fbbc089354475206444b7f2e89b18d
parent1bab38e7bd29347aca642c55a1de91ec6680efce
block: Update bs->options if bdrv_reopen() succeeds

If bdrv_reopen() succeeds then bs->explicit_options is updated with
the new values, but bs->options never changes.

Here's an example:

   { "execute": "blockdev-add",
     "arguments": {
       "driver": "qcow2",
       "node-name": "hd0",
       "overlap-check": "all",
       "file": {
         "driver": "file",
         "filename": "hd0.qcow2"
       }
     }
   }

After this, both bs->options and bs->explicit_options contain
"overlap-check": "all".

Now let's change that using qemu-io's reopen command:

   (qemu) qemu-io hd0 "reopen -o overlap-check=none"

After this, bs->explicit_options contains the new value but
bs->options still keeps the old one.

This patch updates bs->options after a BDS has been successfully
reopened.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c