block: Allow changing 'discard' on reopen
commit593b30719713cfad98b869693095893f8edf76c1
authorAlberto Garcia <berto@igalia.com>
Thu, 6 Sep 2018 09:37:08 +0000 (6 12:37 +0300)
committerKevin Wolf <kwolf@redhat.com>
Mon, 1 Oct 2018 10:51:12 +0000 (1 12:51 +0200)
treedb6c0723ee55cc5151abcfda74c8343d29b853d9
parent8d3245750be30f3191f710f52fbe53ca10e78bfc
block: Allow changing 'discard' on reopen

'discard' is one of the basic BlockdevOptions available for all
drivers, but it's not handled by bdrv_reopen_prepare() so any attempt
to change it results in an error:

   (qemu) qemu-io virtio0 "reopen -o discard=on"
   Cannot change the option 'discard'

Since there's no reason why we shouldn't allow changing it and the
implementation is simple let's just do it.

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