diff options
Diffstat (limited to 'block/qcow2.h')
-rw-r--r-- | block/qcow2.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/block/qcow2.h b/block/qcow2.h index b49424b85e..6aeb7ea90f 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -64,10 +64,16 @@ #define MIN_CLUSTER_BITS 9 #define MAX_CLUSTER_BITS 21 -#define L2_CACHE_SIZE 16 +#define MIN_L2_CACHE_SIZE 1 /* cluster */ /* Must be at least 4 to cover all cases of refcount table growth */ -#define REFCOUNT_CACHE_SIZE 4 +#define MIN_REFCOUNT_CACHE_SIZE 4 /* clusters */ + +#define DEFAULT_L2_CACHE_BYTE_SIZE 1048576 /* bytes */ + +/* The refblock cache needs only a fourth of the L2 cache size to cover as many + * clusters */ +#define DEFAULT_L2_REFCOUNT_SIZE_RATIO 4 #define DEFAULT_CLUSTER_SIZE 65536 @@ -85,6 +91,9 @@ #define QCOW2_OPT_OVERLAP_SNAPSHOT_TABLE "overlap-check.snapshot-table" #define QCOW2_OPT_OVERLAP_INACTIVE_L1 "overlap-check.inactive-l1" #define QCOW2_OPT_OVERLAP_INACTIVE_L2 "overlap-check.inactive-l2" +#define QCOW2_OPT_CACHE_SIZE "cache-size" +#define QCOW2_OPT_L2_CACHE_SIZE "l2-cache-size" +#define QCOW2_OPT_REFCOUNT_CACHE_SIZE "refcount-cache-size" typedef struct QCowHeader { uint32_t magic; |