From: Laurent Vivier <lvivier@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Programmingkid <programmingkidx@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
John Snow <jsnow@redhat.com>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>,
Qemu-block <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom
Date: Thu, 02 Jul 2015 16:33:53 +0200 [thread overview]
Message-ID: <55954BD1.5040406@redhat.com> (raw)
In-Reply-To: <55954895.7060005@redhat.com>
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())
> A FIXME comment saying "we should probe for alignment here" would be
> placed where you check S_ISCHR and set need_alignment to true.
It is another case,
in the previous case (MacOS cdrom), user provides "-cdrom /dev/cdrom"
and QEMU extracts /dev/rdiskX (or now /dev/diskX) from the system DB.
In the FreeBSD case, user provides /dev/diskX or /dev/rdiskX, and QEMU
must know if it needs alignment or not. I don't think we need more
comment here.
Laurent
next prev parent reply other threads:[~2015-07-02 14:34 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 [this message]
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
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=55954BD1.5040406@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).