All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: "Tomáš Golembiovský" <tgolembi@redhat.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	"Max Reitz" <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size' options
Date: Tue, 4 Oct 2016 10:15:10 +0100	[thread overview]
Message-ID: <20161004091510.GD5578@redhat.com> (raw)
In-Reply-To: <20161004085749.GA5316@noname.str.redhat.com>

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	other threads:[~2016-10-04  9:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02 19:13 [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size' options Tomáš Golembiovský
2016-10-03  8:52 ` Daniel P. Berrange
2016-10-03  9:20   ` Paolo Bonzini
2016-10-03 10:47     ` Tomáš Golembiovský
2016-10-03 11:20       ` Paolo Bonzini
2016-10-03 10:45   ` Tomáš Golembiovský
2016-10-03 10:52     ` Daniel P. Berrange
2016-10-03 11:07       ` Tomáš Golembiovský
2016-10-03 11:11         ` Daniel P. Berrange
2016-10-04  8:57         ` Kevin Wolf
2016-10-04  9:15           ` Daniel P. Berrange [this message]
2016-10-04 13:58             ` Eric Blake
2016-10-04 11:48           ` Tomáš Golembiovský
2016-10-03 15:28 ` Eric Blake
2016-10-04  9:24 ` Kevin Wolf
2016-10-04 10:12   ` Paolo Bonzini
2016-10-04 11:59     ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161004091510.GD5578@redhat.com \
    --to=berrange@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tgolembi@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.