From: Wen Congyang <wency@cn.fujitsu.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org, Fam Zheng <famz@redhat.com>,
qemu-devl <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] Question about block driver
Date: Thu, 30 Apr 2015 17:43:16 +0800 [thread overview]
Message-ID: <5541F934.8010100@cn.fujitsu.com> (raw)
In-Reply-To: <20150430093310.GA3368@noname.redhat.com>
On 04/30/2015 05:33 PM, Kevin Wolf wrote:
> [Cc: qemu-block]
>
> Am 30.04.2015 um 11:11 hat Wen Congyang geschrieben:
>> Some drivers use bdrv_open, while the other dirvers use bdrv_file_open().
>> What is the difference between bdrv_open() and bdrv_file_open()?
>
> bdrv_file_open() is used by protocol drivers that don't need any other
> driver to work (e.g. raw-posix), bdrv_open() is used by format drivers
> that need a bs->file (e.g. raw or qcow2).
>
> They used to have different parameters originally, but nowadays that's
> the only difference.
So, if the driver wants to open bs->file itself, it should use bdrv_file_open(),
and the driver wants bs->file has already been opened before its open, it should
use bdrv_open(). Is it right?
Thanks
Wen Congyang
>
> Kevin
> .
>
next prev parent reply other threads:[~2015-04-30 9:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 9:11 [Qemu-devel] Question about block driver Wen Congyang
2015-04-30 9:33 ` Kevin Wolf
2015-04-30 9:43 ` Wen Congyang [this message]
2015-04-30 9:52 ` Kevin Wolf
2015-04-30 15:46 ` 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=5541F934.8010100@cn.fujitsu.com \
--to=wency@cn.fujitsu.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).