action->has_granularity, action->granularity,
action->has_persistent, action->persistent,
action->has_autoload, action->autoload,
+ action->has_x_disabled, action->x_disabled,
&local_err);
if (!local_err) {
bool has_granularity, uint32_t granularity,
bool has_persistent, bool persistent,
bool has_autoload, bool autoload,
+ bool has_disabled, bool disabled,
Error **errp)
{
BlockDriverState *bs;
warn_report("Autoload option is deprecated and its value is ignored");
}
+ if (!has_disabled) {
+ disabled = false;
+ }
+
if (persistent &&
!bdrv_can_store_new_dirty_bitmap(bs, name, granularity, errp))
{
return;
}
+ if (disabled) {
+ bdrv_disable_dirty_bitmap(bitmap);
+ }
+
bdrv_dirty_bitmap_set_persistance(bitmap, persistent);
}
# Currently, all dirty tracking bitmaps are loaded from Qcow2 on
# open.
#
+# @x-disabled: the bitmap is created in the disabled state, which means that
+# it will not track drive changes. The bitmap may be enabled with
+# x-block-dirty-bitmap-enable. Default is false. (Since: 3.0)
+#
# Since: 2.4
##
{ 'struct': 'BlockDirtyBitmapAdd',
'data': { 'node': 'str', 'name': 'str', '*granularity': 'uint32',
- '*persistent': 'bool', '*autoload': 'bool' } }
+ '*persistent': 'bool', '*autoload': 'bool', '*x-disabled': 'bool' } }
##
# @BlockDirtyBitmapMerge: