From: Stefan Hajnoczi <stefanha@gmail.com>
To: PANKAJ RAWAT <pankajr141@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] I/O in backing file
Date: Fri, 30 Mar 2012 08:07:01 +0100 [thread overview]
Message-ID: <20120330070701.GA16159@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <CABZruFCt92uV+S_6zw_0bQmvFvszujBR4uRTb1w4EFHvTQiitA@mail.gmail.com>
On Fri, Mar 30, 2012 at 09:47:52AM +0530, PANKAJ RAWAT wrote:
> I am currently using backing file.The question of my concern is regarding
> the I/O operation
> Now when we create a external snapshot in qcow2, a new file is created
> leaving the original file as backing file
> *
> Can any one tell,*how the I/O is performed in detail way?.
>
> Means when the new snapshot is booted which refer to the backing file as
> original file. *How read operation is performed? how it is decided whether
> the file is present in the snapshot image or the backing file.?
> when write operation is performed how it is decided whether the file is
> already present in backing file or we have to create a new one ?*
>From docs/specs/qed_spec.txt:
"Reads to an unallocated area of the image file access the backing file.
If there is no backing file, then zeroes are produced. The backing file
may be smaller than the image file and reads of unallocated areas beyond
the end of the backing file produce zeroes.
Writes to an unallocated area cause a new data clusters to be allocated,
and a new L2 table if that is also unallocated. The new data cluster is
populated with data from the backing file (or zeroes if no backing file)
and the data being written."
It's similar for qcow2 and other formats that support backing files.
Stefan
prev parent reply other threads:[~2012-03-30 8:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 5:17 [Qemu-devel] I/O in backing file PANKAJ RAWAT
2012-03-30 4:17 ` PANKAJ RAWAT
2012-03-30 7:07 ` Stefan Hajnoczi [this message]
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=20120330070701.GA16159@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=pankajr141@gmail.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).