From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39679 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObFOD-0005lH-PD for qemu-devel@nongnu.org; Tue, 20 Jul 2010 12:09:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObFO8-0006xd-43 for qemu-devel@nongnu.org; Tue, 20 Jul 2010 12:09:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9297) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObFO7-0006xO-Te for qemu-devel@nongnu.org; Tue, 20 Jul 2010 12:09:48 -0400 Message-ID: <4C45CA49.6080901@redhat.com> Date: Tue, 20 Jul 2010 18:09:45 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Disable O_DIRECT for physical CDROM/DVD drives References: <1279639056-20465-1-git-send-email-Jes.Sorensen@redhat.com> <4C45C355.2000204@codemonkey.ws> In-Reply-To: <4C45C355.2000204@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jes.Sorensen@redhat.com, qemu-devel@nongnu.org Am 20.07.2010 17:40, schrieb Anthony Liguori: > On 07/20/2010 10:17 AM, Jes.Sorensen@redhat.com wrote: >> From: Jes Sorensen >> >> O_DIRECT (cache=none) requires sector alignment, however the physical >> sector size of CDROM/DVD drives is 2048, as opposed to most disk >> devices which use 512. QEMU is hard coding 512 all over the place, so >> allowing O_DIRECT for CDROM/DVD devices does not work. >> >> Signed-off-by: Jes Sorensen >> > > Wouldn't a better solution be to have a cdrom_read/cdrom_write hook that > did the appropriate bouncing? We already have code that does some bouncing, we'd just need to teach it to use different sizes than 512. Duplicating everything wouldn't be a nice solution. > Silently disabling something a user explicitly asked for is not a good > option. In the very least, it should error out entirely. Yeah, that's probably better. Kevin