于 2012-7-9 22:36, Christoph Hellwig 写道:
On Mon, Jul 09, 2012 at 04:54:08PM +0800, Wenchao Xia wrote:
Hi, Paolo and folks,
qemu have good capabilities to access different virtual disks, I want
to expose its block layer API to let 3rd party program linked in, such
as management stack or block tools, to access images data directly.
Following is the objects:
(1) API to write/read block device at offset.
(2) Determine the image type,qcow2/qed/raw
(3) Determine which blocks are allocated.
(4) Determine backing file.
Sounds like you want a procedural interface for that. At least for (1)
I have patches I'll submit soon to add qemu img read/write commands.
Yes, the purpose is introduce API interface about block data, the
operation was supposed to happen frequently, a linked-in library may be
better than process output string parsing in performance.
--
Best Regards
Wenchao Xia