From: Anthony Liguori <anthony@codemonkey.ws>
To: Fabrice Bellard <fabrice@bellard.org>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Increase default qcow cluster size to 4KB
Date: Mon, 19 Jun 2006 17:16:28 -0500 [thread overview]
Message-ID: <4497223C.6000702@codemonkey.ws> (raw)
[-- Attachment #1: Type: text/plain, Size: 26 bytes --]
Regards,
Anthony Liguori
[-- Attachment #2: qemu-qcow-cluster.diff --]
[-- Type: text/plain, Size: 1275 bytes --]
# HG changeset patch
# User Anthony Liguori <anthony@codemonkey.ws>
# Node ID 76bb5704c9afe3fb930e81e13fd6de57b452ff5c
# Parent 4fcb5f2d8d8646e56ddb2f6bac4d457b66fdb8ab
Change default cluster size for qcow disks to 4KB. This size makes it much
easier for implementing high-performance qcow backends (for things like Xen)
as the kernel tends to like to deal with reads/writes in at least 4K chunks.
diff -r 4fcb5f2d8d86 -r 76bb5704c9af block-qcow.c
--- a/block-qcow.c Mon Jun 19 00:41:28 2006 +0000
+++ b/block-qcow.c Mon Jun 19 17:14:52 2006 -0500
@@ -574,13 +574,10 @@ static int qcow_create(const char *filen
} else
backing_file = NULL;
header.mtime = cpu_to_be32(st.st_mtime);
- header.cluster_bits = 9; /* 512 byte cluster to avoid copying
- unmodifyed sectors */
- header.l2_bits = 12; /* 32 KB L2 tables */
- } else {
- header.cluster_bits = 12; /* 4 KB clusters */
- header.l2_bits = 9; /* 4 KB L2 tables */
- }
+ }
+ header.cluster_bits = 12; /* 4 KB clusters */
+ header.l2_bits = 9; /* 4 KB L2 tables */
+
header_size = (header_size + 7) & ~7;
shift = header.cluster_bits + header.l2_bits;
l1_size = ((total_size * 512) + (1LL << shift) - 1) >> shift;
reply other threads:[~2006-06-19 22:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4497223C.6000702@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=fabrice@bellard.org \
--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).