Daniel P. Berrangé <berra...@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 <dgilb...@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>

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

Thanks, I always wondered why it had that name, but never did the patch.


Reply via email to