Re: [Qemu-devel] [PATCH v2 08/10] block: Allow changing 'discard' on reopen

2018-09-05 Thread Alberto Garcia
On Mon 03 Sep 2018 04:34:06 PM CEST, Alberto Garcia wrote: > +value = qemu_opt_get_del(opts, "discard"); > +if (value != NULL) { > +if (bdrv_parse_discard_flags(value, &reopen_state->flags) != 0) { > +error_setg(errp, "Invalid discard option"); > +ret = -EI

Re: [Qemu-devel] [PATCH v2 08/10] block: Allow changing 'discard' on reopen

2018-09-05 Thread Max Reitz
On 2018-09-03 16:34, Alberto Garcia wrote: > '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 optio

[Qemu-devel] [PATCH v2 08/10] block: Allow changing 'discard' on reopen

2018-09-03 Thread Alberto Garcia
'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 a