All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Increase default qcow cluster size to 4KB
@ 2006-06-19 22:16 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2006-06-19 22:16 UTC (permalink / raw)
  To: Fabrice Bellard, qemu-devel

[-- 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-19 22:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-19 22:16 [Qemu-devel] [PATCH] Increase default qcow cluster size to 4KB Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.