qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 07/25] migration: Always report an error in block_save_set


From: Peter Xu
Subject: Re: [PATCH v4 07/25] migration: Always report an error in block_save_setup()
Date: Fri, 8 Mar 2024 14:59:57 +0800

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

[Prev in Thread] Current Thread [Next in Thread]