diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2022-06-20 12:01:49 +0100 |
|---|---|---|
| committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2022-06-22 18:59:38 +0100 |
| commit | 154d87b4ef7f32fe4b11357648ec0b81b7e77d59 (patch) | |
| tree | 5dc335430a22be1a031a944974c90bdf0d6c5aef /migration/qemu-file.h | |
| parent | c7fc8d323ad1a3110925088096376eca4163be71 (diff) | |
| download | focaccia-qemu-154d87b4ef7f32fe4b11357648ec0b81b7e77d59.tar.gz focaccia-qemu-154d87b4ef7f32fe4b11357648ec0b81b7e77d59.zip | |
migration: rename 'pos' field in QEMUFile to 'bytes_processed'
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> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> dgilbert: Fixed long line
Diffstat (limited to 'migration/qemu-file.h')
0 files changed, 0 insertions, 0 deletions