qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 10/21] migration: convert savevm to use QIOChannelBlock fo


From: Juan Quintela
Subject: Re: [PATCH v2 10/21] migration: convert savevm to use QIOChannelBlock for VMState
Date: Mon, 20 Jun 2022 17:19:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Daniel P. Berrangé <berrange@redhat.com> wrote:
> With this change, all QEMUFile usage is backed by QIOChannel at
> last.
>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>


>  {
>      if (is_writable) {
> -        return qemu_fopen_ops(bs, &bdrv_write_ops, false);
> +        return 
> qemu_fopen_channel_output(QIO_CHANNEL(qio_channel_block_new(bs)));
> +    } else {
> +        return 
> qemu_fopen_channel_input(QIO_CHANNEL(qio_channel_block_new(bs)));
>      }
> -    return qemu_fopen_ops(bs, &bdrv_read_ops, false);
>  }

I really preffer the original syntax:

    if (is_writable) {
        return 
qemu_fopen_channel_output(QIO_CHANNEL(qio_channel_block_new(bs)));
    }
    return qemu_fopen_channel_input(QIO_CHANNEL(qio_channel_block_new(bs)));

But as you wrote the patch, and it is a big cleanup, I will not
complain.

Later, Juan.




reply via email to

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