summaryrefslogtreecommitdiffstats
path: root/include/block/dirty-bitmap.h
diff options
context:
space:
mode:
authorEric Blake2019-11-14 03:46:33 +0100
committerEric Blake2019-11-18 23:01:34 +0100
commitcf7c49cf6aedb0486ca7ba7c32aa819fe51dadfb (patch)
treed22968feb61ad3cd6060605293ed8f1a9976d6b4 /include/block/dirty-bitmap.h
parentnbd/server: Prefer heap over stack for parsing client names (diff)
downloadqemu-cf7c49cf6aedb0486ca7ba7c32aa819fe51dadfb.tar.gz
qemu-cf7c49cf6aedb0486ca7ba7c32aa819fe51dadfb.tar.xz
qemu-cf7c49cf6aedb0486ca7ba7c32aa819fe51dadfb.zip
bitmap: Enforce maximum bitmap name length
We document that for qcow2 persistent bitmaps, the name cannot exceed 1023 bytes. It is inconsistent if transient bitmaps do not have to abide by the same limit, and it is unlikely that any existing client even cares about using bitmap names this long. It's time to codify that ALL bitmaps managed by qemu (whether persistent in qcow2 or not) have a documented maximum length. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20191114024635.11363-3-eblake@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Diffstat (limited to 'include/block/dirty-bitmap.h')
-rw-r--r--include/block/dirty-bitmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
index 958e7474fb..e2b20ecab9 100644
--- a/include/block/dirty-bitmap.h
+++ b/include/block/dirty-bitmap.h
@@ -14,6 +14,8 @@ typedef enum BitmapCheckFlags {
BDRV_BITMAP_INCONSISTENT)
#define BDRV_BITMAP_ALLOW_RO (BDRV_BITMAP_BUSY | BDRV_BITMAP_INCONSISTENT)
+#define BDRV_BITMAP_MAX_NAME_SIZE 1023
+
BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,
uint32_t granularity,
const char *name,