1 #ifndef BLOCK_HELPERS_H
2 #define BLOCK_HELPERS_H
4 #include "qemu/units.h"
6 /* lower limit is sector size */
7 #define MIN_BLOCK_SIZE INT64_C(512)
8 #define MIN_BLOCK_SIZE_STR "512 B"
10 * upper limit is arbitrary, 2 MiB looks sufficient for all sensible uses, and
11 * matches qcow2 cluster size limit
13 #define MAX_BLOCK_SIZE (2 * MiB)
14 #define MAX_BLOCK_SIZE_STR "2 MiB"
16 void check_block_size(const char *id
, const char *name
, int64_t value
,
19 #endif /* BLOCK_HELPERS_H */