[PATCH 02/22] blockdev: Allow resizing everywhere

Max Reitz posted 22 patches 6 years, 4 months ago
There is a newer version of this series
[PATCH 02/22] blockdev: Allow resizing everywhere
Posted by Max Reitz 6 years, 4 months ago
Block nodes that do not allow resizing should not share BLK_PERM_RESIZE.
It does not matter whether they are the first non-filter in their chain
or not.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 blockdev.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index b62b33dc03..0420bc29be 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3198,11 +3198,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;
-- 
2.21.0


Re: [PATCH 02/22] blockdev: Allow resizing everywhere
Posted by Vladimir Sementsov-Ogievskiy 6 years, 4 months ago
20.09.2019 18:27, Max Reitz wrote:
> Block nodes that do not allow resizing should not share BLK_PERM_RESIZE.
> It does not matter whether they are the first non-filter in their chain
> or not.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


-- 
Best regards,
Vladimir