[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5] migration: Move the yank unregister of channel_close out
|
From: |
Peter Xu |
|
Subject: |
Re: [PATCH 5/5] migration: Move the yank unregister of channel_close out |
|
Date: |
Wed, 21 Jul 2021 11:45:50 -0400 |
On Wed, Jul 21, 2021 at 11:39:37AM +0100, Dr. David Alan Gilbert wrote:
> > +/*
> > + * Return the ioc object if it's a migration channel. Note: it can return
> > NULL
> > + * for callers passing in a non-migration qemufile. E.g. see
> > qemu_fopen_bdrv()
> > + * and its usage in e.g. load_snapshot(). So we need to check against NULL
> > + * before using it. If without the check,
> > migration_incoming_state_destroy()
> > + * could fail for load_snapshot().
> > + */
> > +QIOChannel *migration_file_get_ioc(QEMUFile *file)
> > +{
> > + return file->has_ioc ? QIO_CHANNEL(file->opaque) : NULL;
> > +}
>
> Do you think this should go in the previous patch where you created
> has_ioc? Also the name is weird, qemu_file is probably right for
> everything in here.
Sure; let me just move it over with it renamed. Thanks,
--
Peter Xu
[PATCH 3/5] migration: Introduce migration_ioc_[un]register_yank(), Peter Xu, 2021/07/20
[PATCH 4/5] migration: Teach QEMUFile to be QIOChannel-aware, Peter Xu, 2021/07/20
[PATCH 5/5] migration: Move the yank unregister of channel_close out, Peter Xu, 2021/07/20