Home
last modified time | relevance | path

Searched full:bitmap (Results 1 – 25 of 391) sorted by relevance

12345678910>>...16

/openbmc/qemu/block/
H A Ddirty-bitmap.c2 * Block Dirty Bitmap
30 #include "block/dirty-bitmap.h"
35 HBitmap *bitmap; /* Dirty bitmap implementation */ member
36 bool busy; /* Bitmap is busy, it can't be used via QMP */
39 int64_t size; /* Size of the bitmap, in bytes */
40 bool disabled; /* Bitmap is disabled. It ignores all writes to
43 bool readonly; /* Bitmap is read-only. This field also
47 and this bitmap must remain unchanged while
49 bool persistent; /* bitmap must be saved to owner disk image */
50 bool inconsistent; /* bitmap is persistent, but inconsistent.
[all …]
H A Dqcow2-bitmap.c30 #include "block/dirty-bitmap.h"
40 /* Bitmap directory entry constraints */
47 /* Size of bitmap table entries */
53 #error In the code bitmap table physical size assumed to fit into int
56 /* Bitmap directory entry flags */
192 error_setg(errp, "Too much space will be occupied by the bitmap. " in check_constraints_on_bitmap()
287 * @bitmap must be cleared */
290 uint32_t bitmap_table_size, BdrvDirtyBitmap *bitmap) in load_bitmap_data() argument
295 uint64_t bm_size = bdrv_dirty_bitmap_size(bitmap); in load_bitmap_data()
299 bdrv_dirty_bitmap_serialization_size(bitmap, 0, bm_size)); in load_bitmap_data()
[all …]
H A Dparallels-ext.c30 #include "block/dirty-bitmap.h"
61 /* Given L1 table read bitmap data from the image and populate @bitmap */
64 uint32_t l1_size, BdrvDirtyBitmap *bitmap, in parallels_load_bitmap_data() argument
70 uint64_t bm_size = bdrv_dirty_bitmap_size(bitmap); in parallels_load_bitmap_data()
73 DIV_ROUND_UP(bdrv_dirty_bitmap_serialization_size(bitmap, 0, bm_size), in parallels_load_bitmap_data()
77 error_setg(errp, "Bitmap table size %" PRIu32 " does not correspond " in parallels_load_bitmap_data()
78 "to bitmap size and cluster size. Expected %" PRIu64, in parallels_load_bitmap_data()
84 limit = bdrv_dirty_bitmap_serialization_coverage(s->cluster_size, bitmap); in parallels_load_bitmap_data()
90 /* No need to deserialize zeros because @bitmap is cleared. */ in parallels_load_bitmap_data()
95 bdrv_dirty_bitmap_deserialize_ones(bitmap, offset, count, false); in parallels_load_bitmap_data()
[all …]
/openbmc/qemu/include/block/
H A Ddirty-bitmap.h25 int bdrv_dirty_bitmap_create_successor(BdrvDirtyBitmap *bitmap,
27 BdrvDirtyBitmap *bdrv_dirty_bitmap_abdicate(BdrvDirtyBitmap *bitmap,
29 BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BdrvDirtyBitmap *bitmap,
31 void bdrv_dirty_bitmap_enable_successor(BdrvDirtyBitmap *bitmap);
34 int bdrv_dirty_bitmap_check(const BdrvDirtyBitmap *bitmap, uint32_t flags,
36 void bdrv_release_dirty_bitmap(BdrvDirtyBitmap *bitmap);
46 void bdrv_disable_dirty_bitmap(BdrvDirtyBitmap *bitmap);
47 void bdrv_enable_dirty_bitmap(BdrvDirtyBitmap *bitmap);
48 void bdrv_enable_dirty_bitmap_locked(BdrvDirtyBitmap *bitmap);
51 uint32_t bdrv_dirty_bitmap_granularity(const BdrvDirtyBitmap *bitmap);
[all …]
/openbmc/qemu/block/monitor/
H A Dbitmap-qmp-cmds.c2 * QEMU block dirty bitmap QMP commands
37 #include "block/dirty-bitmap.h"
43 * Return a dirty bitmap (if present), after validating
44 * the node reference and bitmap names.
47 * @name: The name of the bitmap to search for
51 * @return: A bitmap object on success, or NULL on failure.
59 BdrvDirtyBitmap *bitmap; in block_dirty_bitmap_lookup() local
68 error_setg(errp, "Bitmap name cannot be NULL"); in block_dirty_bitmap_lookup()
77 bitmap = bdrv_find_dirty_bitmap(bs, name); in block_dirty_bitmap_lookup()
78 if (!bitmap) { in block_dirty_bitmap_lookup()
[all …]
/openbmc/qemu/tests/qemu-iotests/
H A D242.out2 {"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 16384, "name"…
21 No bitmap in JSON format output
24 {"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 32768, "name":…
42 name: bitmap-1
53 "name": "bitmap-1"
58 {"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name"…
76 name: bitmap-1
81 name: bitmap-2
92 "name": "bitmap-1"
99 "name": "bitmap-2"
[all …]
H A D2464 # Test persistent bitmap resizing.
50 vm.qmp_log("block-dirty-bitmap-add", node="drive0",
52 vm.qmp_log("block-dirty-bitmap-add", node="drive0",
54 vm.qmp_log("block-dirty-bitmap-add", node="drive0",
56 vm.qmp_log("block-dirty-bitmap-add", node="drive0",
68 log('--- Adding new bitmap, growing image, and adding 2nd new bitmap ---')
69 vm.qmp_log("block-dirty-bitmap-add", node="drive0",
73 vm.qmp_log("block-dirty-bitmap-add", node="drive0",
85 log('--- Adding "NewB" bitmap, removing "New" bitmap ---')
86 vm.qmp_log("block-dirty-bitmap-add", node="drive0",
[all …]
H A D12443 return transaction_action('block-dirty-bitmap-clear',
52 class Bitmap: class
191 def make_reference_backup(self, bitmap=None): argument
192 if bitmap is None:
193 bitmap = self.bitmaps[-1]
194 _, reference = bitmap.last_target()
195 res = self.do_qmp_backup(job_id=bitmap.drive['id'],
196 device=bitmap.drive['id'], sync='full',
197 format=bitmap.drive['fmt'], target=reference)
202 bitmap = Bitmap(name, drive)
[all …]
H A D257.out2 === Mode bitmap; Bitmap Sync never with simulated failure ===
37 --- Add Bitmap ---
39 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node"…
67 = Checking Bitmap bitmap0 =
94 … false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "back…
152 = Checking Bitmap bitmap0 =
155 = Checking Bitmap (anonymous) =
177 = Checking Bitmap bitmap0 =
205 = Checking Bitmap bitmap0 =
232 … false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "back…
[all …]
H A D2364 # Test bitmap merges.
54 vm.qmp_log("block-dirty-bitmap-add", node="drive0",
56 vm.qmp_log("block-dirty-bitmap-add", node="drive0",
70 { "type": "block-dirty-bitmap-disable",
72 { "type": "block-dirty-bitmap-add",
75 { "type": "block-dirty-bitmap-clear",
83 { "type": "block-dirty-bitmap-disable",
85 { "type": "block-dirty-bitmap-add",
89 { "type": "block-dirty-bitmap-disable",
91 { "type": "block-dirty-bitmap-enable",
[all …]
H A D2234 # Test reading dirty bitmap over NBD
83 { "execute": "block-dirty-bitmap-add",
91 { "execute": "block-dirty-bitmap-add",
103 echo "=== Write part of the file under active bitmap ==="
121 _send_qemu_cmd $QEMU_HANDLE '{"execute":"block-dirty-bitmap-disable",
126 _send_qemu_cmd $QEMU_HANDLE '{"execute":"block-dirty-bitmap-add",
149 "arguments":{"device":"n", "bitmap":"b"}}' "return"
156 "bitmap":"b2"}}' "error" # enabled vs. read-only
159 "bitmap":"b3"}}' "error" # Missing bitmap
162 "description":"some text", "bitmap":"b2"}}' "return"
[all …]
H A D246.out8 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 32768, "name": "Small", "node": …
10 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "Medium", "node": "drive0", "persistent…
12 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 131072, "name": "Large", "node":…
14 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "Transient", "node": "drive0", "persist…
88 --- Adding new bitmap, growing image, and adding 2nd new bitmap ---
89 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "New", "node": "drive0", "persistent": …
93 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "Newtwo", "node": "drive0", "persistent…
191 --- Adding "NewB" bitmap, removing "New" bitmap ---
192 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "NewB", "node": "drive0", "persistent":…
194 {"execute": "block-dirty-bitmap-remove", "arguments": {"name": "New", "node": "drive0"}}
[all …]
H A D236.out6 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmapA", "node"…
8 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmapB", "node"…
55 "type": "block-dirty-bitmap-disable"
63 "type": "block-dirty-bitmap-add"
70 "type": "block-dirty-bitmap-clear"
119 "type": "block-dirty-bitmap-disable"
127 "type": "block-dirty-bitmap-add"
134 "type": "block-dirty-bitmap-disable"
141 "type": "block-dirty-bitmap-enable"
172 "type": "block-dirty-bitmap-disable"
[all …]
H A D254.out1 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap0", "node": "drive0"}}
3 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap1", "node": "drive0", "persisten…
5 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap2", "node": "drive0", "persisten…
24 "type": "block-dirty-bitmap-add"
37 "type": "block-dirty-bitmap-merge"
45 "type": "block-dirty-bitmap-add"
58 "type": "block-dirty-bitmap-merge"
66 "type": "block-dirty-bitmap-add"
79 "type": "block-dirty-bitmap-merge"
86 "type": "block-dirty-bitmap-remove"
H A D260.out4 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap0", "node": "drive0", "persisten…
6 initial bitmap: name=bitmap0 dirty-clusters=1
16 check bitmap after commit: name=bitmap0 dirty-clusters=2
17 check updated bitmap: name=bitmap0 dirty-clusters=3
21 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap0", "node": "drive0", "persisten…
23 initial bitmap: name=bitmap0 dirty-clusters=1
33 check bitmap after commit: name=bitmap0 dirty-clusters=2
34 check updated bitmap: name=bitmap0 dirty-clusters=3
38 {"execute": "block-dirty-bitmap-add", "arguments": {"name": "bitmap0", "node": "drive0", "persisten…
40 initial bitmap: name=bitmap0 dirty-clusters=1
[all …]
/openbmc/qemu/tests/qemu-iotests/tests/
H A Dqemu-img-bitmaps4 # Test qemu-img bitmap handling
60 # Create backing image with one bitmap
62 $QEMU_IMG bitmap --add -f $IMGFMT "$TEST_IMG.base" b0
70 $QEMU_IMG bitmap --add -g 512k -f $IMGFMT "$TEST_IMG" b1
71 $QEMU_IMG bitmap --add --disable -f $IMGFMT "$TEST_IMG" b2
73 $QEMU_IMG bitmap --clear -f $IMGFMT "$TEST_IMG" b1
75 $QEMU_IMG bitmap --disable -f $IMGFMT "$TEST_IMG" b1
76 $QEMU_IMG bitmap --enable -f $IMGFMT "$TEST_IMG" b2
80 echo "=== Bitmap preservation not possible to non-qcow2 ==="
88 echo "=== Convert with bitmap preservation ==="
[all …]
H A Dqemu-img-close-errors.out8 qemu-img bitmap --add exit code: 0
9 …t bitmaps during inactivation of node 'NODE_NAME': Failed to write bitmap 'good-bitmap' to file: N…
11 …t bitmaps during inactivation of node 'NODE_NAME': Failed to write bitmap 'good-bitmap' to file: N…
12 qemu-img bitmap --merge exit code: 1
17 … bitmaps during inactivation of node 'NODE_NAME': Failed to write bitmap 'stale-bitmap-7' to file:…
18 … bitmaps during inactivation of node 'NODE_NAME': Failed to write bitmap 'stale-bitmap-7' to file:…
21 qemu-img bitmap --add exit code: 0
22 qemu-img bitmap --merge exit code: 0
H A Dqemu-img-close-errors50 # failures in different places. With a low number, only merging the bitmap
58 $QEMU_IMG bitmap --add "$TEST_IMG.base" "stale-bitmap-$i"
77 $QEMU_IMG bitmap --add "$TEST_IMG" "good-bitmap"
84 $QEMU_IMG bitmap --add "$BASE_JSON" "good-bitmap"
85 echo "qemu-img bitmap --add exit code: $?"
87 $QEMU_IMG bitmap --merge "good-bitmap" -b "$TEST_IMG" "$BASE_JSON" \
88 "good-bitmap" 2>&1 | _filter_generated_node_ids
89 echo "qemu-img bitmap --merge exit code: ${PIPESTATUS[0]}"
/openbmc/qemu/migration/
H A Dblock-dirty-bitmap.c2 * Block dirty bitmap postcopy migration
24 * Bitmap migration implies creating bitmap with the same name and granularity
25 * in destination QEMU. If the bitmap with the same name (for the same node)
34 * [ 1 byte: bitmap alias size ] \ flags & BITMAP_NAME
35 * [ n bytes: bitmap alias ] /
37 * # Start of bitmap migration (flags & START)
40 * 1 byte: bitmap flags (corresponds to BdrvDirtyBitmap)
41 * bit 0 - bitmap is enabled
42 * bit 1 - bitmap is persistent
43 * bit 2 - bitmap is autoloading
[all …]
/openbmc/qemu/hw/ppc/
H A Dspapr_ovec.c17 #include "qemu/bitmap.h"
27 /* we *could* work with bitmaps directly, but handling the bitmap privately
28 * allows us to more safely make assumptions about the bitmap size and
32 unsigned long *bitmap; member
41 VMSTATE_BITMAP(bitmap, SpaprOptionVector, 1, bitmap_size),
51 ov->bitmap = bitmap_new(OV_MAXBITS); in spapr_ovec_new()
64 bitmap_copy(ov->bitmap, ov_orig->bitmap, OV_MAXBITS); in spapr_ovec_clone()
77 bitmap_and(ov->bitmap, ov1->bitmap, ov2->bitmap, OV_MAXBITS); in spapr_ovec_intersect()
89 bitmap_andnot(tmp, ov1->bitmap, ov2->bitmap, OV_MAXBITS); in spapr_ovec_subset()
100 g_free(ov->bitmap); in spapr_ovec_cleanup()
[all …]
/openbmc/qemu/docs/interop/
H A Dbitmaps.rst31 that is tracked is the granularity of the bitmap. If the granularity of a
32 bitmap is 64K, each '1' bit means that a 64K region as a whole may have
36 requires more computational overhead and larger bitmap sizes. Larger
37 granularities mean smaller bitmap sizes, but less targeted backups.
39 The size of a bitmap (in bytes) can be computed as such:
42 e.g. the size of a 64KiB granularity bitmap on a 2TiB image is:
56 attaching the bitmap elsewhere in the storage graph. This is beyond the scope
72 writes bitmap data to disk upon close. If persistence is not required for a
73 specific use case, all bitmap features excepting persistence are available for
77 any changes to the bitmap will be discarded upon exit.
[all …]
H A Dqcow2.rst305 Byte 0: Type of feature (select feature bitmap)
310 1: Bit number within the selected feature bitmap (valid
321 to store bitmaps related to a virtual disk. For now, there is only one bitmap
322 type: the dirty tracking bitmap, which tracks virtual disk changes from some
340 Size of the bitmap directory in bytes. It is the cumulative
341 size of all (nb_bitmaps) bitmap directory entries.
344 Offset into the image file at which the bitmap directory
647 The last 64 bits contain a subcluster allocation bitmap with this format:
649 Subcluster Allocation Bitmap (for standard clusters)::
673 Subcluster Allocation Bitmap (for compressed clusters)::
[all …]
/openbmc/qemu/include/qemu/
H A Dhbitmap.h2 * Hierarchical Bitmap Data Type
53 * @size: Number of bits in the bitmap.
54 * @granularity: Granularity of the bitmap. Aligned groups of 2^@granularity
66 * @hb: The bitmap to change the size of.
67 * @size: The number of elements to change the bitmap to accommodate.
69 * truncate or grow an existing bitmap to accommodate a new number of elements.
87 * Return whether the bitmap is empty.
124 * @start and @count must be aligned to bitmap granularity. The only exception
125 * is resetting the tail of the bitmap: @count may be equal to hb->orig_size -
153 * Returns whether the bitmap can actually be (de-)serialized. Other
[all …]
/openbmc/qemu/include/system/
H A Dramblock.h51 /* dirty bitmap used during migration */
57 /* bitmap of pages present in the migration file */
66 /* Bitmap of already received pages. Only used on destination side. */
70 * bitmap to track already cleared dirty bitmap. When the bit is
73 * and split clearing of dirty bitmap on the remote node (e.g.,
74 * KVM). The bitmap will be set only when doing global sync.
79 * NOTE: this bitmap is different comparing to the other bitmaps
93 * bitmap. Receiving any page beyond this length will bail out, as it
104 /* 1-setting of the bitmap represents ram is populated (shared) */
106 unsigned long *bitmap; member
/openbmc/qemu/qapi/
H A Dtransaction.json48 # @block-dirty-bitmap-add: Since 2.5
50 # @block-dirty-bitmap-remove: Since 4.2
52 # @block-dirty-bitmap-clear: Since 2.5
54 # @block-dirty-bitmap-enable: Since 4.0
56 # @block-dirty-bitmap-disable: Since 4.0
58 # @block-dirty-bitmap-merge: Since 4.0
78 'data': [ 'abort', 'block-dirty-bitmap-add', 'block-dirty-bitmap-remove',
79 'block-dirty-bitmap-clear', 'block-dirty-bitmap-enable',
80 'block-dirty-bitmap-disable', 'block-dirty-bitmap-merge',
172 'block-dirty-bitmap-add': 'BlockDirtyBitmapAddWrapper',
[all …]

12345678910>>...16