Re: [Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives

2010-07-20 Thread Anthony Liguori
On 07/20/2010 11:45 AM, Natalia Portillo wrote: El 20/07/2010, a las 16:17, jes.soren...@redhat.com escribió: 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. QEM

Re: [Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives

2010-07-20 Thread Natalia Portillo
El 20/07/2010, a las 16:17, jes.soren...@redhat.com escribió: > 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

Re: [Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives

2010-07-20 Thread Jes Sorensen
On 07/20/10 18:45, Natalia Portillo wrote: > El 20/07/2010, a las 16:17, jes.soren...@redhat.com escribió: > >> 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 5

Re: [Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives

2010-07-20 Thread Jes Sorensen
On 07/20/10 18:12, Kevin Wolf wrote: > Am 20.07.2010 18:04, schrieb Jes Sorensen: >> On 07/20/10 17:40, Kevin Wolf wrote: >> Thats effectively what my patch does. cdrom_open() calls >> raw_open_common() which has this part: >> >> /* Use O_DSYNC for write-through caching, no flags for write-back

Re: [Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives

2010-07-20 Thread Kevin Wolf
Am 20.07.2010 18:04, schrieb Jes Sorensen: > On 07/20/10 17:40, Kevin Wolf wrote: >>> diff --git a/block/raw-posix.c b/block/raw-posix.c >>> index 291699f..0ea79b6 100644 >>> --- a/block/raw-posix.c >>> +++ b/block/raw-posix.c >>> @@ -1139,6 +1139,11 @@ static int cdrom_open(BlockDriverState *bs, c

Re: [Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives

2010-07-20 Thread Jes Sorensen
On 07/20/10 17:40, Kevin Wolf wrote: >> diff --git a/block/raw-posix.c b/block/raw-posix.c >> index 291699f..0ea79b6 100644 >> --- a/block/raw-posix.c >> +++ b/block/raw-posix.c >> @@ -1139,6 +1139,11 @@ static int cdrom_open(BlockDriverState *bs, const >> char *filename, int flags) >> BDRVRa

Re: [Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives

2010-07-20 Thread Kevin Wolf
Am 20.07.2010 17:17, schrieb jes.soren...@redhat.com: > 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 > allowin

[Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives

2010-07-20 Thread Jes . Sorensen
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: Je