qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom


From: Programmingkid
Subject: Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom
Date: Thu, 2 Jul 2015 19:19:37 -0400

On Jul 2, 2015, at 10:33 AM, Laurent Vivier wrote:

> 
> 
> On 02/07/2015 16:20, Paolo Bonzini wrote:
>> 
>> 
>> On 02/07/2015 16:18, Laurent Vivier wrote:
>>>>> I'm okay with doing the simple thing, but it needs a comment for 
>>>>> non-BSDers.
>>> So, what we have to do, in our case, for MacOS X cdrom, is something like:
>>> 
>>> ... GetBSDPath ...
>>> ...
>>>    if (flags & BDRV_O_NOCACHE) {
>>>        strcat(bsdPath, "r");
>>>    }
>>> ...
>>> 
>>> ?
>> 
>> Well, what to do with Mac OS X CD-ROM is another story...  Raw access
>> "seems not do work well" according to John, so we may have a comment
>> there explaining why we're not adding the "r".
> 
> I think it doesn't work well because they need to be aligned, and
> NOCACHE implies that (with BDRV_O_NOCACHE code will be self explicit :) )
> 
> raw_open_common()
> 
>    if ((bs->open_flags & BDRV_O_NOCACHE) != 0) {
>        s->needs_alignment = true;
>    }
> 
> and needs_alignment allows to probe alignment (raw_probe_alignment())

Thank you very much for this. Raw cdrom access now works with this code. I
just had to modify it so it just sets s->needs_alignment to true without 
checking
the if condition. The if condition didn't work. 




reply via email to

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