From: Laurent Vivier <lvivier@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Qemu-block <qemu-block@nongnu.org>,
Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>,
Programmingkid <programmingkidx@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom
Date: Wed, 08 Jul 2015 12:47:57 +0200 [thread overview]
Message-ID: <559CFFDD.3000704@redhat.com> (raw)
In-Reply-To: <20150708103125.GE4117@noname.redhat.com>
On 08/07/2015 12:31, Kevin Wolf wrote:
> Am 02.07.2015 um 16:18 hat Laurent Vivier geschrieben:
>>
>>
>> On 02/07/2015 16:03, Paolo Bonzini wrote:
>>>
>>>
>>> On 02/07/2015 15:58, Laurent Vivier wrote:
>>>> Since any /dev entry can be treated as a raw disk image, it is worth
>>>> noting which devices can be accessed when and how. /dev/rdisk nodes are
>>>> character-special devices, but are "raw" in the BSD sense and force
>>>> block-aligned I/O. They are closer to the physical disk than the buffer
>>>> cache. /dev/disk nodes, on the other hand, are buffered block-special
>>>> devices and are used primarily by the kernel's filesystem code.
>>>
>>> So the right thing to do would not be just to set need_alignment, but to
>>> probe it like we do on Linux for BDRV_O_NO_CACHE.
>>>
>>> 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");
>> }
>> ...
>
> I would avoid such magic. What we could do is rejecting /dev/rdisk nodes
> without BDRV_O_NOCACHE.
It's not how it works...
Look in hdev_open().
If user provides /dev/cdrom on the command line, in the case of MacOS X,
QEMU searches for a cdrom drive in the system and set filename to
/dev/rdiskX according to the result.
Perhaps this part should be removed.
But if we just want to correct the bug, we must not set filename to
/dev/rdiskX if NOCACHE is not set but to /dev/diskX
It's the aim of this change.
Laurent
next prev parent reply other threads:[~2015-07-08 10:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-01 22:13 [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom Programmingkid
2015-07-01 22:32 ` M A
2015-07-02 7:18 ` Paolo Bonzini
2015-07-02 7:39 ` Laurent Vivier
2015-07-02 7:54 ` Paolo Bonzini
2015-07-02 11:14 ` Stefan Hajnoczi
2015-07-02 12:24 ` Laurent Vivier
2015-07-02 13:47 ` Paolo Bonzini
2015-07-02 13:58 ` Laurent Vivier
2015-07-02 14:03 ` Paolo Bonzini
2015-07-02 14:18 ` Laurent Vivier
2015-07-02 14:20 ` Paolo Bonzini
2015-07-02 14:33 ` Laurent Vivier
2015-07-02 23:19 ` Programmingkid
2015-07-03 0:46 ` [Qemu-devel] [PATCH v2] " Programmingkid
2015-07-08 10:31 ` [Qemu-devel] [PATCH] " Kevin Wolf
2015-07-08 10:47 ` Laurent Vivier [this message]
2015-07-08 11:01 ` Kevin Wolf
2015-07-08 12:56 ` Programmingkid
2015-07-08 13:11 ` Kevin Wolf
2015-07-08 13:14 ` Programmingkid
2015-07-08 12:59 ` Laurent Vivier
[not found] ` <33C18758-309D-4A09-8276-31641B63B963@gmail.com>
[not found] ` <CAJSP0QWrh0qcX9u9iYVfCJrtgh9w0Aw4dW9jUTQRXhrBoseC2g@mail.gmail.com>
[not found] ` <6FE80FDC-996C-45B6-B5F8-F4F16A10F396@gmail.com>
[not found] ` <CAJSP0QW9SOLM2+UQW0bV4rr407XWmdNp6VFBaUabx14_iM5xPQ@mail.gmail.com>
[not found] ` <A36B6438-BC34-4C2A-B8CA-8EDFB9747AF3@gmail.com>
2015-07-07 8:05 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=559CFFDD.3000704@redhat.com \
--to=lvivier@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=programmingkidx@gmail.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).