[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V3 3/6] block/rbd: update s->image_size in qemu_rbd_getlength
From: |
Ilya Dryomov |
Subject: |
Re: [PATCH V3 3/6] block/rbd: update s->image_size in qemu_rbd_getlength |
Date: |
Sat, 19 Jun 2021 21:57:42 +0200 |
On Wed, May 19, 2021 at 4:26 PM Peter Lieven <pl@kamp.de> wrote:
>
> 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 --git a/block/rbd.c b/block/rbd.c
> index b4caea4f1b..97a2ae4c84 100644
> --- a/block/rbd.c
> +++ b/block/rbd.c
> @@ -976,6 +976,7 @@ static int64_t qemu_rbd_getlength(BlockDriverState *bs)
> return r;
> }
>
> + s->image_size = info.size;
> return info.size;
Since you are touching this function might as well switch to
rbd_get_size() to put size directly into s->image_size and return
s->image_size, skipping rbd_image_info_t.
Thanks,
Ilya
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH V3 3/6] block/rbd: update s->image_size in qemu_rbd_getlength,
Ilya Dryomov <=