From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46018 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObG07-0006ab-IJ for qemu-devel@nongnu.org; Tue, 20 Jul 2010 12:49:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObG05-0005BB-Pk for qemu-devel@nongnu.org; Tue, 20 Jul 2010 12:49:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30089) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObG05-0005Aq-Et for qemu-devel@nongnu.org; Tue, 20 Jul 2010 12:49:01 -0400 Message-ID: <4C45D375.9060107@redhat.com> Date: Tue, 20 Jul 2010 18:48:53 +0200 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives References: <1279639056-20465-1-git-send-email-Jes.Sorensen@redhat.com> <78CCC2B7-3124-4B24-9A96-771B8A6D4C27@claunia.com> In-Reply-To: <78CCC2B7-3124-4B24-9A96-771B8A6D4C27@claunia.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Natalia Portillo Cc: qemu-devel@nongnu.org On 07/20/10 18:45, Natalia Portillo wrote: > El 20/07/2010, a las 16:17, Jes.Sorensen@redhat.com escribi=F3: >=20 >> From: Jes Sorensen >> >> O_DIRECT (cache=3Dnone) requires sector alignment, however the physica= l >> 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. >=20 > What about if the device is a 4096 byte/sector hard disk, a 512 byte/se= ctor CD-ROM (IRIX ones), a 2048 byte/sector magnetooptical? >=20 > We should get rid of that hard codes and use real values. I totally agree! However for now my patch throws an error for the CDROM case, which is better than the old situation. We need to fix it in general, but it isn't trivial. The 4096 sector size hard disk going to be the main issue. Jes