On Sat, Jan 30, 2016 at 04:15:32PM +0100, Wido den Hollander wrote: > Modify virCheckFlags that it accepts both VIR_STORAGE_VOL_RESIZE_DELTA > and VIR_STORAGE_VOL_RESIZE_SHRINK as valid flags for resizing RBD > volumes. > > This still does not solve the problem where RBD volumes can't be > shrinked using libvirt. The allocation and capacity of RBD volumes > are equal for a RBD volume and this makes libvirt think the volume > is fully allocated and therefor can't be shrinked. > > Signed-off-by: Wido den Hollander <wido@xxxxxxxxx> > --- > src/storage/storage_backend_rbd.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c > index 80a1d33..88b613a 100644 > --- a/src/storage/storage_backend_rbd.c > +++ b/src/storage/storage_backend_rbd.c > @@ -1041,7 +1041,8 @@ static int virStorageBackendRBDResizeVol(virConnectPtr conn ATTRIBUTE_UNUSED, > int ret = -1; > int r = 0; > > - virCheckFlags(0, -1); > + virCheckFlags(VIR_STORAGE_VOL_RESIZE_DELTA | The storage driver calculates the new capacity in storageVolResize and masks off the VIR_STORAGE_VOL_RESIZE_DELTA flag. It should never be set here. Jan
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list