[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 05/21] migration: rename 'pos' field in QEMUFile to 'bytes
From: |
Juan Quintela |
Subject: |
Re: [PATCH v2 05/21] migration: rename 'pos' field in QEMUFile to 'bytes_processed' |
Date: |
Mon, 20 Jun 2022 17:12:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Daniel P. Berrangé <berrange@redhat.com> wrote:
> The field name 'pos' gives the misleading impression that the QEMUFile
> objects are seekable. This is not the case, as in general we just
> have an opaque stream. The users of this method are only interested
> in the total bytes processed. This switches to a new name that
> reflects the intended usage.
>
> Every QIOChannel backed impl of QEMUFile is currently ignoring the
> 'pos' field.
>
> The only QEMUFile impl using 'pos' as an offset for I/O is the block
> device vmstate. A later patch is introducing a QIOChannel impl for the
> vmstate, and to handle this it is tracking a file offset itself
> internally to the QIOChannel impl. So when we later eliminate the
> QEMUFileOps callbacks later, the 'pos' field will no longer be used
> from any I/O read/write methods.
>
> 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>
Thanks, I always wondered why it had that name, but never did the patch.
- [PATCH v2 00/21] migration: remove QEMUFileOps concept and assume use of QIOChannel, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 02/21] migration: switch to use QIOChannelNull for dummy channel, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 01/21] io: add a QIOChannelNull equivalent to /dev/null, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 03/21] migration: remove unreachble RDMA code in save_hook impl, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 05/21] migration: rename 'pos' field in QEMUFile to 'bytes_processed', Daniel P . Berrangé, 2022/06/20
- Re: [PATCH v2 05/21] migration: rename 'pos' field in QEMUFile to 'bytes_processed',
Juan Quintela <=
- [PATCH v2 06/21] migration: rename qemu_ftell to qemu_file_total_transferred, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 04/21] migration: rename rate limiting fields in QEMUFile, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 10/21] migration: convert savevm to use QIOChannelBlock for VMState, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 13/21] migration: introduce new constructors for QEMUFile, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 07/21] migration: rename qemu_update_position to qemu_file_credit_transfer, Daniel P . Berrangé, 2022/06/20