Received: from eggs.gnu.org ([2001:4830:134:3::10]:43456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAnlj-0007ih-VB for qemu-devel@nongnu.org; Thu, 02 Jul 2015 19:19:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAnlg-0005gH-O8 for qemu-devel@nongnu.org; Thu, 02 Jul 2015 19:19:47 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <55954BD1.5040406@redhat.com> Date: Thu, 2 Jul 2015 19:19:37 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <36F29A2C-053D-426B-93AA-674A98F48463@gmail.com> References: <55952D97.7040009@redhat.com> <559540F6.9090800@redhat.com> <55954384.9010906@redhat.com> <559544C4.4050809@redhat.com> <55954836.3060700@redhat.com> <55954895.7060005@redhat.com> <55954BD1.5040406@redhat.com> Subject: Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: Kevin Wolf , Peter Maydell , Qemu-block , Stefan Hajnoczi , qemu-devel qemu-devel , Paolo Bonzini , John Snow On Jul 2, 2015, at 10:33 AM, Laurent Vivier wrote: >=20 >=20 > On 02/07/2015 16:20, Paolo Bonzini wrote: >>=20 >>=20 >> On 02/07/2015 16:18, Laurent Vivier wrote: >>>>> I'm okay with doing the simple thing, but it needs a comment for = non-BSDers. >>> So, what we have to do, in our case, for MacOS X cdrom, is something = like: >>>=20 >>> ... GetBSDPath ... >>> ... >>> if (flags & BDRV_O_NOCACHE) { >>> strcat(bsdPath, "r"); >>> } >>> ... >>>=20 >>> ? >>=20 >> Well, what to do with Mac OS X CD-ROM is another story... Raw access >> "seems not do work well" according to John, so we may have a comment >> there explaining why we're not adding the "r". >=20 > I think it doesn't work well because they need to be aligned, and > NOCACHE implies that (with BDRV_O_NOCACHE code will be self explicit = :) ) >=20 > raw_open_common() >=20 > if ((bs->open_flags & BDRV_O_NOCACHE) !=3D 0) { > s->needs_alignment =3D true; > } >=20 > and needs_alignment allows to probe alignment (raw_probe_alignment()) Thank you very much for this. Raw cdrom access now works with this code. = I just had to modify it so it just sets s->needs_alignment to true without = checking the if condition. The if condition didn't work.=20