[Top][All Lists]

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

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

From: Jes Sorensen
Subject: Re: [Qemu-devel] [PATCH] Disable O_DIRECT for physical CDROM/DVD drives
Date: Tue, 20 Jul 2010 18:18:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5

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
>> caching,
>>      * and O_DIRECT for no caching. */
>>     if ((bdrv_flags & BDRV_O_NOCACHE))
>>         s->open_flags |= O_DIRECT;
> s and bs both have a field open_flags (and I think they share some more
> field names, which has caused confusion more than once). I meant the bs
> one here.
> Kevin

It shows up even that case is handled as one of the first things
bdrv_open_common() does is to set bs->open_flags = flags. Anyway
throwing an error as Anthony suggested seems safer.


reply via email to

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