qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] Error on O_DIRECT for physical CDROM/DVD dri


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [PATCH v3] Error on O_DIRECT for physical CDROM/DVD drives
Date: Wed, 21 Jul 2010 15:15:26 +0200
User-agent: Mutt/1.3.28i

On Wed, Jul 21, 2010 at 09:45:19AM +0200, address@hidden wrote:
> From: Jes Sorensen <address@hidden>
> 
> 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.
> 
> Return -ENOTSUP from cdrom_open() in this case.

The patch is not quite correct.  There are CDROMs with 512 byte sectors,
just as there are disks with larger sector sizes.  And of course these
limitations also apply when running ontop of filesystems.

So we really need to handle these things better and need to query
the sector size of the device and handle it properly.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]