qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 01/10] docs: Describe zero data clusters in QED specification
Date: Wed, 13 Apr 2011 14:05:07 +0200	[thread overview]
Message-ID: <1302696316-26190-2-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1302696316-26190-1-git-send-email-kwolf@redhat.com>

From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

Zero data clusters are a space-efficient way of storing zeroed regions
of the image.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 docs/specs/qed_spec.txt |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/docs/specs/qed_spec.txt b/docs/specs/qed_spec.txt
index 1d5fa87..7982e05 100644
--- a/docs/specs/qed_spec.txt
+++ b/docs/specs/qed_spec.txt
@@ -89,6 +89,7 @@ L1, L2, and data cluster offsets must be aligned to header.cluster_size.  The fo
 
 ===Data cluster offsets===
 * 0 - unallocated.  The data cluster is not yet allocated.
+* 1 - zero.  The data cluster contents are all zeroes and no cluster is allocated.
 
 Future format extensions may wish to store per-offset information.  The least significant 12 bits of an offset are reserved for this purpose and must be set to zero.  Image files with cluster_size > 2^12 will have more unused bits which should also be zeroed.
 
@@ -97,6 +98,13 @@ Reads to an unallocated area of the image file access the backing file.  If ther
 
 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.
 
+===Zero data clusters===
+Zero data clusters are a space-efficient way of storing zeroed regions of the image.
+
+Reads to a zero data cluster produce zeroes.  Note that the difference between an unallocated and a zero data cluster is that zero data clusters stop the reading of contents from the backing file.
+
+Writes to a zero data cluster cause a new data cluster to be allocated.  The new data cluster is populated with zeroes and the data being written.
+
 ===Logical offset translation===
 Logical offsets are translated into cluster offsets as follows:
 
-- 
1.7.2.3

  reply	other threads:[~2011-04-13 12:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13 12:05 [Qemu-devel] [PULL 00/10] Block patches Kevin Wolf
2011-04-13 12:05 ` Kevin Wolf [this message]
2011-04-13 12:05 ` [Qemu-devel] [PATCH 02/10] qed: Add support for zero clusters Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 03/10] atapi: Drives can be locked without media present Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 04/10] atapi: Report correct errors on guest eject request Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 05/10] atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 06/10] atapi: Move GET_EVENT_STATUS_NOTIFICATION command handling to its own function Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 07/10] atapi: GESN: Use structs for commonly-used field types Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 08/10] atapi: GESN: Standardise event response handling for future additions Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 09/10] atapi: GESN: implement 'media' subcommand Kevin Wolf
2011-04-13 12:05 ` [Qemu-devel] [PATCH 10/10] vpc.c: Use get_option_parameter() does the search Kevin Wolf

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=1302696316-26190-2-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=anthony@codemonkey.ws \
    --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).