[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback
From: |
Peter Xu |
Subject: |
Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback |
Date: |
Wed, 22 Jun 2022 16:13:39 -0400 |
On Wed, Jun 22, 2022 at 03:34:52PM -0400, Peter Xu wrote:
> On Wed, Jun 22, 2022 at 07:39:06PM +0100, Dr. David Alan Gilbert (git) wrote:
> > diff --git a/migration/qemu-file.c b/migration/qemu-file.c
> > index 74f919de67..e206b05550 100644
> > --- a/migration/qemu-file.c
> > +++ b/migration/qemu-file.c
> > @@ -377,8 +377,22 @@ static ssize_t qemu_fill_buffer(QEMUFile *f)
> > return 0;
> > }
> >
> > - len = f->ops->get_buffer(f->ioc, f->buf + pending,
> > f->total_transferred,
> > - IO_BUF_SIZE - pending, &local_error);
> > + do {
> > + len = qio_channel_read(f->ioc,
> > + (char *)f->buf + pending,
> > + IO_BUF_SIZE - pending,
> > + &local_error);
> > + if (len == QIO_CHANNEL_ERR_BLOCK) {
> > + if (qemu_in_coroutine()) {
> > + qio_channel_yield(f->ioc, G_IO_IN);
> > + } else {
> > + qio_channel_wait(f->ioc, G_IO_IN);
> > + }
> > + } else if (len < 0) {
> > + len = EIO;
>
> This should be -EIO.
>
> > + }
> > + } while (len == QIO_CHANNEL_ERR_BLOCK);
>
> It's failing only with the new TLS test I added for postcopy somehow (at
> least /x86_64/migration/postcopy/recovery/tls).. I also verified after the
> change it'll work again.
Hmm, when I wanted to run the whole bunch of the migration-test again I
found that precopy tls test hangs (/x86_64/migration/precopy/unix/tls/psk).
Though for this time it also hangs for me even with the master branch, so
maybe not anything wrong with this specific pull req but still something
needs fixing..
--
Peter Xu
- [PULL 15/33] migration: stop passing 'opaque' parameter to QEMUFile hooks, (continued)
- [PULL 15/33] migration: stop passing 'opaque' parameter to QEMUFile hooks, Dr. David Alan Gilbert (git), 2022/06/22
- [PULL 14/33] migration: convert savevm to use QIOChannelBlock for VMState, Dr. David Alan Gilbert (git), 2022/06/22
- [PULL 12/33] migration: rename qemu_file_update_transfer to qemu_file_acct_rate_limit, Dr. David Alan Gilbert (git), 2022/06/22
- [PULL 17/33] migration: introduce new constructors for QEMUFile, Dr. David Alan Gilbert (git), 2022/06/22
- [PULL 18/33] migration: remove unused QEMUFileGetFD typedef / qemu_get_fd method, Dr. David Alan Gilbert (git), 2022/06/22
- [PULL 11/33] migration: rename qemu_update_position to qemu_file_credit_transfer, Dr. David Alan Gilbert (git), 2022/06/22
- [PULL 23/33] migration: remove the QEMUFileOps 'writev_buffer' callback, Dr. David Alan Gilbert (git), 2022/06/22
- [PULL 24/33] migration: remove the QEMUFileOps 'get_return_path' callback, Dr. David Alan Gilbert (git), 2022/06/22
- [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Dr. David Alan Gilbert (git), 2022/06/22
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Peter Xu, 2022/06/22
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback,
Peter Xu <=
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Daniel P . Berrangé, 2022/06/23
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Peter Xu, 2022/06/23
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Daniel P . Berrangé, 2022/06/27
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Daniel P . Berrangé, 2022/06/27
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Peter Xu, 2022/06/27
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Daniel P . Berrangé, 2022/06/23
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Dr. David Alan Gilbert, 2022/06/23
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Daniel P . Berrangé, 2022/06/27
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Peter Xu, 2022/06/27
- Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback, Daniel P . Berrangé, 2022/06/28