On Wed, Mar 06, 2024 at 02:34:22PM +0100, Cédric Le Goater wrote:
> @@ -404,6 +403,10 @@ static int init_blk_migration(QEMUFile *f)
>          sectors = bdrv_nb_sectors(bs);
>          if (sectors <= 0) {

Not directly relevant to this patch, but just to mention that this looks
suspicious (even if I know nothing about block migration..) - I am not sure
whether any block drive would return 0 here, if so it looks still like a
problem if we do the cleanup, ignoring the rest and return a success.

>              ret = sectors;
> +            if (ret < 0) {
> +                error_setg(errp, "Error getting length of block device %s",
> +                           bdrv_get_device_name(bs));
> +            }
>              bdrv_next_cleanup(&it);
>              goto out;
>          }

-- 
Peter Xu


Reply via email to