diff mbox series

[V2,3/7] block/rbd: update s->image_size in qemu_rbd_getlength

Message ID 20210126112540.11880-4-pl@kamp.de (mailing list archive)
State New, archived
Headers show
Series block/rbd: migrate to coroutines and add write zeroes support | expand

Commit Message

Peter Lieven Jan. 26, 2021, 11:25 a.m. UTC
in case the image size changed we should adjust our internally stored size as well.

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 block/rbd.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/block/rbd.c b/block/rbd.c
index 1028596c68..f68ebcf240 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -964,6 +964,7 @@  static int64_t qemu_rbd_getlength(BlockDriverState *bs)
         return r;
     }
 
+    s->image_size = info.size;
     return info.size;
 }