qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size'


From: Daniel P. Berrange
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size' options
Date: Tue, 4 Oct 2016 10:15:10 +0100
User-agent: Mutt/1.7.0 (2016-08-17)

On Tue, Oct 04, 2016 at 10:57:49AM +0200, Kevin Wolf wrote:
> Am 03.10.2016 um 13:07 hat Tomáš Golembiovský geschrieben:
> > > > > > +    if (((bs->drv != &bdrv_file) || !bs->read_only) &&    
> > > > > 
> > > > > Why the check against bdrv_file ?  
> > > > 
> > > > To limit it only to files. Maybe there is better way to do that? The
> > > > devices have a nasty habit to change the size. Sure, this can happen to
> > > > file too, e.g. if somebody truncates the file outside QEMU. But that's
> > > > rather a bad behaviour. For devices changing the size may be perfectly
> > > > valid operation, e.g. replacing CD in drive or card in a card reader.  
> > > 
> > > The raw driver is usable over any storage backend (file, rbd, iscsi,
> > > etc, etc) and it is valid to want to use a offset/size parameter in
> > > combination with any of them. So we should not restrict it to just
> > > files.
> 
> Just to clear up some confusion here: There are the file/host_device/...
> protocol drivers, which only access local files. These are implemented
> in raw-posix.c, i.e. the file that this patch is touching. raw-win32.c
> implements the same kind of file access for Windows.

This naming is constantly confusing - is there any appetite for renaming
those to 'file-posix.c' and 'file-win32.c', and raw_bsd.c to raw.c ?

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]