From: Eric Blake <eblake@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>, Vasiliy Tolstov <v.tolstov@selfip.ru>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] help with understanding qcow2 file format
Date: Wed, 16 Sep 2015 07:46:14 -0600 [thread overview]
Message-ID: <55F972A6.50906@redhat.com> (raw)
In-Reply-To: <55F94CC1.5050401@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 920 bytes --]
On 09/16/2015 05:04 AM, Laszlo Ersek wrote:
> On 09/16/15 12:56, Vasiliy Tolstov wrote:
>> Hi, I'm need help to understand qcow2 file format, can somebody explain
>> to me, for example if i need to read 1K from offset 512?
>>
>> As i'm understand i need to calculate offset in qcow2 file using some
>> things from header, can somebody explains my how can i do that?
>
> All I can say is, "docs/specs/qcow2.txt".
qemu-img map file.qcow2
is a great way to learn which physical host offsets hold the data at
which guest offsets.
As for coding interactions with qcow2, see the source under block/qcow2.c.
You may also be interested in the visual representation of qcow2 in my
KVM Forum slides, part 1:
http://events.linuxfoundation.org/sites/events/files/slides/2015-qcow2-expanded.pdf
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-09-16 13:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 10:56 [Qemu-devel] help with understanding qcow2 file format Vasiliy Tolstov
2015-09-16 11:04 ` Laszlo Ersek
2015-09-16 11:15 ` Vasiliy Tolstov
2015-09-16 11:58 ` Markus Armbruster
2015-09-16 13:46 ` Eric Blake [this message]
2015-09-17 7:07 ` Vasiliy Tolstov
2015-09-17 14:38 ` Eric Blake
2016-01-29 14:40 ` lspnet
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=55F972A6.50906@redhat.com \
--to=eblake@redhat.com \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=v.tolstov@selfip.ru \
/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).