qed.h (4235d77349e93e7157555f20f1892088f55edff4) qed.h (7ab74849a5724452b35982a6e7d658c25839f5e5)
1/*
2 * QEMU Enhanced Disk Format
3 *
4 * Copyright IBM, Corp. 2010
5 *
6 * Authors:
7 * Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
8 * Anthony Liguori <aliguori@us.ibm.com>

--- 29 unchanged lines hidden (view full) ---

38 * +----------+ +----------+
39 *
40 * The L1 table is fixed size and always present. L2 tables are allocated on
41 * demand. The L1 table size determines the maximum possible image size; it
42 * can be influenced using the cluster_size and table_size values.
43 *
44 * All fields are little-endian on disk.
45 */
1/*
2 * QEMU Enhanced Disk Format
3 *
4 * Copyright IBM, Corp. 2010
5 *
6 * Authors:
7 * Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
8 * Anthony Liguori <aliguori@us.ibm.com>

--- 29 unchanged lines hidden (view full) ---

38 * +----------+ +----------+
39 *
40 * The L1 table is fixed size and always present. L2 tables are allocated on
41 * demand. The L1 table size determines the maximum possible image size; it
42 * can be influenced using the cluster_size and table_size values.
43 *
44 * All fields are little-endian on disk.
45 */
46
46#define QED_DEFAULT_CLUSTER_SIZE 65536
47enum {
48 QED_MAGIC = 'Q' | 'E' << 8 | 'D' << 16 | '\0' << 24,
49
50 /* The image supports a backing file */
51 QED_F_BACKING_FILE = 0x01,
52
53 /* The image needs a consistency check before use */
54 QED_F_NEED_CHECK = 0x02,

--- 9 unchanged lines hidden (view full) ---

64 QED_AUTOCLEAR_FEATURE_MASK = 0, /* supported autoclear feature bits */
65
66 /* Data is stored in groups of sectors called clusters. Cluster size must
67 * be large to avoid keeping too much metadata. I/O requests that have
68 * sub-cluster size will require read-modify-write.
69 */
70 QED_MIN_CLUSTER_SIZE = 4 * 1024, /* in bytes */
71 QED_MAX_CLUSTER_SIZE = 64 * 1024 * 1024,
47enum {
48 QED_MAGIC = 'Q' | 'E' << 8 | 'D' << 16 | '\0' << 24,
49
50 /* The image supports a backing file */
51 QED_F_BACKING_FILE = 0x01,
52
53 /* The image needs a consistency check before use */
54 QED_F_NEED_CHECK = 0x02,

--- 9 unchanged lines hidden (view full) ---

64 QED_AUTOCLEAR_FEATURE_MASK = 0, /* supported autoclear feature bits */
65
66 /* Data is stored in groups of sectors called clusters. Cluster size must
67 * be large to avoid keeping too much metadata. I/O requests that have
68 * sub-cluster size will require read-modify-write.
69 */
70 QED_MIN_CLUSTER_SIZE = 4 * 1024, /* in bytes */
71 QED_MAX_CLUSTER_SIZE = 64 * 1024 * 1024,
72 QED_DEFAULT_CLUSTER_SIZE = 64 * 1024,
73
74 /* Allocated clusters are tracked using a 2-level pagetable. Table size is
75 * a multiple of clusters so large maximum image sizes can be supported
76 * without jacking up the cluster size too much.
77 */
78 QED_MIN_TABLE_SIZE = 1, /* in clusters */
79 QED_MAX_TABLE_SIZE = 16,
80 QED_DEFAULT_TABLE_SIZE = 4,

--- 264 unchanged lines hidden ---
72
73 /* Allocated clusters are tracked using a 2-level pagetable. Table size is
74 * a multiple of clusters so large maximum image sizes can be supported
75 * without jacking up the cluster size too much.
76 */
77 QED_MIN_TABLE_SIZE = 1, /* in clusters */
78 QED_MAX_TABLE_SIZE = 16,
79 QED_DEFAULT_TABLE_SIZE = 4,

--- 264 unchanged lines hidden ---