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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v3] Error on O_DIRECT for physical CDROM/DVD drives
Date: Wed, 21 Jul 2010 16:13:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Christoph Hellwig <address@hidden> writes:

> 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.

Agreed, but I figure Jes's fix is the best we can do for .13, and worth
doing for .13.



reply via email to

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