From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYzFv-00031O-0L for qemu-devel@nongnu.org; Mon, 07 Sep 2015 12:26:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYzFu-0003u6-18 for qemu-devel@nongnu.org; Mon, 07 Sep 2015 12:26:54 -0400 References: <1437414365-11881-1-git-send-email-mreitz@redhat.com> <1437414365-11881-2-git-send-email-mreitz@redhat.com> <20150907155917.GE5529@noname.redhat.com> From: Max Reitz Message-ID: <55EDBAC2.4070107@redhat.com> Date: Mon, 7 Sep 2015 18:26:42 +0200 MIME-Version: 1.0 In-Reply-To: <20150907155917.GE5529@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="91WeHJS7ASEQcj6AUWA81bjFQaXXfH2hE" Subject: Re: [Qemu-devel] [PATCH v4 01/38] block: Remove host floppy support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Alberto Garcia , qemu-block@nongnu.org, John Snow , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --91WeHJS7ASEQcj6AUWA81bjFQaXXfH2hE Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07.09.2015 17:59, Kevin Wolf wrote: > Am 20.07.2015 um 19:45 hat Max Reitz geschrieben: >> It has been deprecated as of 2.3, so we can now remove it. >> >> Signed-off-by: Max Reitz >=20 >> @@ -2241,8 +2188,9 @@ static BlockAIOCB *hdev_aio_ioctl(BlockDriverSta= te *bs, >> pool =3D aio_get_thread_pool(bdrv_get_aio_context(bs)); >> return thread_pool_submit_aio(pool, aio_worker, acb, cb, opaque);= >> } >> +#endif /* linux */ >> =20 >> -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) >> +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) >> static int fd_open(BlockDriverState *bs) >> { >> BDRVRawState *s =3D bs->opaque; >> @@ -2252,7 +2200,7 @@ static int fd_open(BlockDriverState *bs) >> return 0; >> return -EIO; >> } >> -#else /* !linux && !FreeBSD */ >> +#else /* !FreeBSD */ >> =20 >> static int fd_open(BlockDriverState *bs) >> { >=20 > Full context: >=20 > #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) > static int fd_open(BlockDriverState *bs) > { > BDRVRawState *s =3D bs->opaque; >=20 > /* this is just to ensure s->fd is sane (its called by io ops) = */ > if (s->fd >=3D 0) > return 0; > return -EIO; > } > #else /* !FreeBSD */ >=20 > static int fd_open(BlockDriverState *bs) > { > return 0; > } >=20 > #endif /* !linux && !FreeBSD */ >=20 > First of all, the final comment isn't accurate any more, this branch is= > now for Linux, too. >=20 > But really the whole #ifdef looks dubious now. It's not clear to me why= > we're checking fd >=3D 0 for FreeBSD at all, Me neither, so I just decided to keep it the way it was. > using an invalid file > descriptor (most likely -1, which is set explicitly in some places) > should automatically lead to failure. And conversely, I can't see why > doing the same check for non-FreeBSD platforms should hurt. >=20 > Ideally, I'd try to get rid of all the fd_open() calls, but failing tha= t > let's use the FreeBSD version universally and get rid of the #ifdef at > least. Or perhaps get rid of the #ifdef in this patch and add another > one that removes fd_open() completely. Seems reasonable, will do. >> diff --git a/qapi/block-core.json b/qapi/block-core.json >> index 7b2efb8..133fa38 100644 >> --- a/qapi/block-core.json >> +++ b/qapi/block-core.json >> @@ -215,10 +215,11 @@ >> # @drv: the name of the block format used to open the backing device.= As of >> # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg= ', >> # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device', >> -# 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow', >> +# 'http', 'https', 'nbd', 'parallels', 'qcow', >> # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat' >> # 2.2: 'archipelago' added, 'cow' dropped >> # 2.3: 'host_floppy' deprecated >> +# 2.4: 'host_floppy' dropped >=20 > 2.5 I should have grep'ed through it. :-) Thanks for reviewing! Max --91WeHJS7ASEQcj6AUWA81bjFQaXXfH2hE 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 iQEcBAEBCAAGBQJV7brCAAoJEDuxQgLoOKytNJAIAKXTXGn12aDpG1dafyCvbIZ5 OovGWgNYBJLM/nT4Ytu5VtsnVGUJ3cH3BS8VaZ3x4XiAKapQlCw7IpznEBjvkwHk jVwBSRupsQvkCwEvpKkIUbInu941ubUgwvQ8elixtu6KRbZD5REvOD8GTvLhiDmC XeoD1/QCTyu1HWmpeYKeEu14qhY7pzH/iq9G2Lb/bPOrVctBVDpLWsYS31qe39xS 3V8MiJsKCDCTjXFLVExWYLN05SiD/AB8KONdhlY9RCdMgWEHd10XP1J4B7YL/c8x 5sOWGOCSfzQ6mtytI1Z87Q5iuuMkrC7awz2rg+2yeM9asN5OyzxVmEtT3FHOBQk= =mUPN -----END PGP SIGNATURE----- --91WeHJS7ASEQcj6AUWA81bjFQaXXfH2hE--