Regards, Anthony Liguori
# HG changeset patch # User Anthony Liguori <[EMAIL PROTECTED]> # 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;
_______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel