qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] 回复: some confusion on qemu i/o pocess and the qcow2for


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] 回复: some confusion on qemu i/o pocess and the qcow2format
Date: Wed, 2 Dec 2015 21:29:50 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

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: signature.asc
Description: PGP signature


reply via email to

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