Revision 99cce9fa

b/block/qcow2.c
1036 1036
    const char *backing_fmt = NULL;
1037 1037
    uint64_t sectors = 0;
1038 1038
    int flags = 0;
1039
    size_t cluster_size = 65536;
1039
    size_t cluster_size = DEFAULT_CLUSTER_SIZE;
1040 1040
    int prealloc = 0;
1041 1041

  
1042 1042
    /* Read out options */
......
1343 1343
    {
1344 1344
        .name = BLOCK_OPT_CLUSTER_SIZE,
1345 1345
        .type = OPT_SIZE,
1346
        .help = "qcow2 cluster size"
1346
        .help = "qcow2 cluster size",
1347
        .value = { .n = DEFAULT_CLUSTER_SIZE },
1347 1348
    },
1348 1349
    {
1349 1350
        .name = BLOCK_OPT_PREALLOC,
b/block/qcow2.h
54 54
/* Must be at least 4 to cover all cases of refcount table growth */
55 55
#define REFCOUNT_CACHE_SIZE 4
56 56

  
57
#define DEFAULT_CLUSTER_SIZE 65536
58

  
57 59
typedef struct QCowHeader {
58 60
    uint32_t magic;
59 61
    uint32_t version;
b/block/qed.c
1464 1464
    }, {
1465 1465
        .name = BLOCK_OPT_CLUSTER_SIZE,
1466 1466
        .type = OPT_SIZE,
1467
        .help = "Cluster size (in bytes)"
1467
        .help = "Cluster size (in bytes)",
1468
        .value = { .n = QED_DEFAULT_CLUSTER_SIZE },
1468 1469
    }, {
1469 1470
        .name = BLOCK_OPT_TABLE_SIZE,
1470 1471
        .type = OPT_SIZE,
b/block/vdi.c
87 87
#define MiB     (KiB * KiB)
88 88

  
89 89
#define SECTOR_SIZE 512
90
#define DEFAULT_CLUSTER_SIZE (1 * MiB)
90 91

  
91 92
#if defined(CONFIG_VDI_DEBUG)
92 93
#define logout(fmt, ...) \
......
803 804
    int result = 0;
804 805
    uint64_t bytes = 0;
805 806
    uint32_t blocks;
806
    size_t block_size = 1 * MiB;
807
    size_t block_size = DEFAULT_CLUSTER_SIZE;
807 808
    uint32_t image_type = VDI_TYPE_DYNAMIC;
808 809
    VdiHeader header;
809 810
    size_t i;
......
921 922
    {
922 923
        .name = BLOCK_OPT_CLUSTER_SIZE,
923 924
        .type = OPT_SIZE,
924
        .help = "VDI cluster (block) size"
925
        .help = "VDI cluster (block) size",
926
        .value = { .n = DEFAULT_CLUSTER_SIZE },
925 927
    },
926 928
#endif
927 929
#if defined(CONFIG_VDI_STATIC_IMAGE)

Also available in: Unified diff