On Tue, Oct 18, 2022 at 01:46:45PM +0300, Nikolay Borisov wrote: > > > On 18.10.22 г. 13:14 ч., Daniel P. Berrangé wrote: > > On Mon, Oct 10, 2022 at 04:34:02PM +0300, Nikolay Borisov wrote: > > > Add a bunch of auxiliarry methods and a feature flag to work with > > > SEEKABLE channels. Currently the only channel considered seekable is > > > QIOChannelFile. Also add a bunch of helper functions to QEMUFile that > > > can make use of this channel feature. All of this is in prepration for > > > supporting 'fixed-ram' migration stream feature. > > > > QIOChannelBuffer/Null are also seekable. > > Right, however I think for seek we also want to rely on the feature of > filesystem that when you seek beyond EOF you won't actually allocate/use up > the space from (eof, CUR_SEEK), with ChannelBuffer we'd have to actually > allocate the space or add this support on top.
I'm fine with not implementing this for ChannelBuffer. Mostly making the point that the APIs should be in QIOChannel base class, so that someone could implement it in any subclass in future where it makes sense. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
