From: Stefan Hajnoczi <stefanha@gmail.com>
To: 浩樊啊 <fanh2010@foxmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] 回复: some confusion on qemu i/o pocess and the qcow2format
Date: Wed, 2 Dec 2015 21:29:50 +0800 [thread overview]
Message-ID: <20151202132950.GA29511@stefanha-x1.localdomain> (raw)
In-Reply-To: <tencent_04C6AF085D5F3396311ECC83@qq.com>
[-- Attachment #1: Type: text/plain, Size: 878 bytes --]
On Tue, Dec 01, 2015 at 03:14:14PM +0800, 浩樊啊 wrote:
> I read the source code of qcow2.
> I can see bdrv_co_do_readv---bdrv_co_do_preadv---bdrv_aligned_preadv---drv->bdrv_co_readv (here drv.bdrv_co_readv=qcow2_co_readv)
> but when I read qcow2_co_readv->bdrv_co_readv->bdrv_co_do_readv->bdrv_co_do_preadv
> I am confused about this. qcow2_co_readv use bdrv_co_do_preadv again?
The qcow2 BlockDriverState uses a file BlockDriverState to do the actual
I/O. This way the qcow2 image format can be used on POSIX files, iSCSI
LUNs, Gluster files, etc.
It means that qcow2 code does not call preadv(2)/pwritev(2) directly but
instead uses another BlockDriverState to perform the actual I/O. In
QEMU we keep "image format" block drivers (e.g. qcow2, vmdk, vhdx)
separate from "protocol" block drivers (e.g. POSIX, Win32, Gluster,
Sheepdog, iSCSI).
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-12-02 13:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 3:21 [Qemu-devel] some confusion on qemu i/o pocess and the qcow2 format =?gb18030?B?usa3rrCh?=
2015-11-25 9:44 ` Stefan Hajnoczi
[not found] ` <tencent_04C6AF085D5F3396311ECC83@qq.com>
2015-12-02 13:29 ` Stefan Hajnoczi [this message]
2015-12-21 2:48 ` [Qemu-devel] =?gb18030?b?u9i4tKO6ICC72Li0o7ogIHNvbWVjb25mdXNpb24g?= =?gb18030?q?on_qemu_i/o_pocess_and_the_qcow2format?= =?gb18030?B?usa3rrCh?=
2015-12-22 6:35 ` [Qemu-devel] 回复: 回复: someconfusion on qemu i/o pocess and the qcow2format 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=20151202132950.GA29511@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=fanh2010@foxmail.com \
--cc=qemu-devel@nongnu.org \
/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).