Message ID | 20191111160216.197086-3-mreitz@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: Fix check_to_replace_node() | expand |
On Mon 11 Nov 2019 05:01:55 PM CET, Max Reitz wrote: > @@ -3177,11 +3177,6 @@ void qmp_block_resize(bool has_device, const char *device, > aio_context = bdrv_get_aio_context(bs); > aio_context_acquire(aio_context); > > - if (!bdrv_is_first_non_filter(bs)) { > - error_setg(errp, QERR_FEATURE_DISABLED, "resize"); > - goto out; > - } > - What happens with this case now? https://lists.gnu.org/archive/html/qemu-block/2019-11/msg00793.html Berto
On 06.12.19 15:04, Alberto Garcia wrote: > On Mon 11 Nov 2019 05:01:55 PM CET, Max Reitz wrote: >> @@ -3177,11 +3177,6 @@ void qmp_block_resize(bool has_device, const char *device, >> aio_context = bdrv_get_aio_context(bs); >> aio_context_acquire(aio_context); >> >> - if (!bdrv_is_first_non_filter(bs)) { >> - error_setg(errp, QERR_FEATURE_DISABLED, "resize"); >> - goto out; >> - } >> - > > What happens with this case now? > > https://lists.gnu.org/archive/html/qemu-block/2019-11/msg00793.html As far as I understand, we have a bug there and we’ll fix it in 5.0. It’s just that in one case, it wasn’t visible because resize wasn’t allowed on some nodes (where I think it should actually be allowed, hence this patch). So I think we should allow resize on those nodes (this patch) and fix the bug, and that should be fine then. Max
diff --git a/blockdev.c b/blockdev.c index ab78230d23..9dc2238bf3 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3177,11 +3177,6 @@ void qmp_block_resize(bool has_device, const char *device, aio_context = bdrv_get_aio_context(bs); aio_context_acquire(aio_context); - if (!bdrv_is_first_non_filter(bs)) { - error_setg(errp, QERR_FEATURE_DISABLED, "resize"); - goto out; - } - if (size < 0) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "size", "a >0 size"); goto out;