From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brQEt-000702-Mp for qemu-devel@nongnu.org; Tue, 04 Oct 2016 09:58:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brQEs-0008WI-NN for qemu-devel@nongnu.org; Tue, 04 Oct 2016 09:58:35 -0400 References: <598de7ff27e32fcb1b7f677f40fb8da4f0a1f512.1475434971.git.tgolembi@redhat.com> <20161003085213.GA13491@redhat.com> <20161003124557.76781119@fiorina> <20161003105259.GF13491@redhat.com> <20161003130707.6fcfd9dc@fiorina> <20161004085749.GA5316@noname.str.redhat.com> <20161004091510.GD5578@redhat.com> From: Eric Blake Message-ID: Date: Tue, 4 Oct 2016 08:58:26 -0500 MIME-Version: 1.0 In-Reply-To: <20161004091510.GD5578@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iEA8k66JxS20GhFk9kK50nw9wVW1uKUCj" Subject: Re: [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size' options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , Kevin Wolf Cc: =?UTF-8?B?VG9tw6HFoSBHb2xlbWJpb3Zza8O9?= , qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iEA8k66JxS20GhFk9kK50nw9wVW1uKUCj From: Eric Blake To: "Daniel P. Berrange" , Kevin Wolf Cc: =?UTF-8?B?VG9tw6HFoSBHb2xlbWJpb3Zza8O9?= , qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz Message-ID: Subject: Re: [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size' options References: <598de7ff27e32fcb1b7f677f40fb8da4f0a1f512.1475434971.git.tgolembi@redhat.com> <20161003085213.GA13491@redhat.com> <20161003124557.76781119@fiorina> <20161003105259.GF13491@redhat.com> <20161003130707.6fcfd9dc@fiorina> <20161004085749.GA5316@noname.str.redhat.com> <20161004091510.GD5578@redhat.com> In-Reply-To: <20161004091510.GD5578@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/04/2016 04:15 AM, Daniel P. Berrange wrote: > On Tue, Oct 04, 2016 at 10:57:49AM +0200, Kevin Wolf wrote: >> Am 03.10.2016 um 13:07 hat Tom=C3=A1=C5=A1 Golembiovsk=C3=BD geschrieb= en: >>>>>>> + if (((bs->drv !=3D &bdrv_file) || !bs->read_only) && =20 >>>>>> >>>>>> Why the check against bdrv_file ? =20 >>>>> >>>>> To limit it only to files. Maybe there is better way to do that? Th= e >>>>> devices have a nasty habit to change the size. Sure, this can happe= n to >>>>> file too, e.g. if somebody truncates the file outside QEMU. But tha= t's >>>>> rather a bad behaviour. For devices changing the size may be perfec= tly >>>>> valid operation, e.g. replacing CD in drive or card in a card reade= r. =20 >>>> >>>> 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/.= =2E. >> 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. >=20 > This naming is constantly confusing - is there any appetite for renamin= g > those to 'file-posix.c' and 'file-win32.c', and raw_bsd.c to raw.c ? I would welcome that naming change. The mix of - vs. _ is bad enough; and _bsd makes me think BSD (non-Linux) rather than shared block device code. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --iEA8k66JxS20GhFk9kK50nw9wVW1uKUCj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX87WCAAoJEKeha0olJ0Nq0f4H/i7wijtxeyxsGBAWqXa2af6E gbzupjQzJ6iJRQX4puU9NZDtb5MFZxbQ61TrrJGtsdODZW92zJbXAQEDmxxae6La uzwX/08KaDC15car516wwrnD2Tm5x/bnhfZ8fGUV9FUF8nbZoEERo5nyqykOr1Ai pJIh80xJgb5eAuWm4yUzhydP29kav6V2fCcuEpAzNwVUMPnTEjrk96mI7kQcDyZX V0z9XaMo7zELcS3HPSveMqqq5c268l2xJz3HVpzm/ICmkLri7G0ypGG4eL+gFXTk 9L7t/eYTk3rFqgmj7GCedod3U/Enh2Hnw3eP0Qymn73lb+QTAQH3hXgY0RuM4Vg= =I36E -----END PGP SIGNATURE----- --iEA8k66JxS20GhFk9kK50nw9wVW1uKUCj--