From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aygby-0007gQ-MW for qemu-devel@nongnu.org; Fri, 06 May 2016 10:20:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aygbm-0003TJ-Vf for qemu-devel@nongnu.org; Fri, 06 May 2016 10:20:05 -0400 References: <1462406126-22946-1-git-send-email-eblake@redhat.com> <1462406126-22946-18-git-send-email-eblake@redhat.com> <20160506130804.GG5093@noname.redhat.com> From: Eric Blake Message-ID: <572CA7E1.3020107@redhat.com> Date: Fri, 6 May 2016 08:19:13 -0600 MIME-Version: 1.0 In-Reply-To: <20160506130804.GG5093@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="D4AseG8ui9978I45qUUUh72nV65pqnvhE" Subject: Re: [Qemu-devel] [PATCH v6 17/20] nbd: Switch to byte-based block access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --D4AseG8ui9978I45qUUUh72nV65pqnvhE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/06/2016 07:08 AM, Kevin Wolf wrote: > Am 05.05.2016 um 01:55 hat Eric Blake geschrieben: >> Sector-based blk_read() should die; switch to byte-based >> blk_pread() instead. >> >> Signed-off-by: Eric Blake >> --- >> qemu-nbd.c | 11 +++++++---- >> 1 file changed, 7 insertions(+), 4 deletions(-) >> >> diff --git a/qemu-nbd.c b/qemu-nbd.c >> index c55b40f..c07ceef 100644 >> --- a/qemu-nbd.c >> +++ b/qemu-nbd.c >> @@ -159,12 +159,13 @@ static int find_partition(BlockBackend *blk, int= partition, >> off_t *offset, off_t *size) >> { >> struct partition_record mbr[4]; >> - uint8_t data[512]; >> + uint8_t data[BDRV_SECTOR_SIZE]; >=20 > I like 512 better, actually. This is not the size of the arbitrary unit= > that some block layer functions use, but the size of an MBR. If you > don't like the magic number, a new #define would probably be best. MBR_SIZE it will be :) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --D4AseG8ui9978I45qUUUh72nV65pqnvhE 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/ iQEcBAEBCAAGBQJXLKfhAAoJEKeha0olJ0Nq47IH/3TvyvNZG8LPTDnO4pnyKDdi nUdcmlP4o9HAgH/PBMHmj7Y/bmOXKrkTdBioowE46heZ00O5MpkkDPhO6IEXMZer BlYiBaM433n9fEhN5FwRk8xBsf6PiGT+4r17mL+1+sTB1fskE8b0TGImh7eKdE7A 4edxGt/rt7objdVW3RPuI/yO9ywz3+br1MjnSeipaKZdqjhcp2oJw5YUTj7tJLiq g6mpmCn0dYl4UBMHhAVn27xVRCJRGVZ9wNKLYJVdWKgqiLv5uJ+MyM3o/VMGkgO4 qpYbWHcOf1zS5l0Ag5ymCx43Rp3KH9eX/ykOkh7/Xo/OZCuIxkaYiN95cNkPBsY= =DBU9 -----END PGP SIGNATURE----- --D4AseG8ui9978I45qUUUh72nV65pqnvhE--