Skip to content

Commit da3aa11

Browse files
authored
Merge pull request #168 from xapi-project/feature/CBT
Merge feature/CBT branch into master
2 parents ca0e7c1 + 074a571 commit da3aa11

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

storage/storage_interface.ml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,12 @@ module VDI = struct
410410
(** [disable_cbt dbg sr vdi] disables changed block tracking for [vdi] *)
411411
external disable_cbt: dbg:debug_info -> sr:sr -> vdi:vdi -> unit = ""
412412

413+
(** [data_destroy dbg sr vdi] deletes the data of the snapshot [vdi] without deleting its changed block tracking metadata *)
414+
external data_destroy: dbg:debug_info -> sr:sr -> vdi:vdi -> unit = ""
415+
416+
(** [export_changed_blocks dbg sr vdi_from vdi_to] returns the blocks that have changed between [vdi_from] and [vdi_to] as a base64-encoded bitmap string *)
417+
external export_changed_blocks: dbg:debug_info -> sr:sr -> vdi_from:vdi -> vdi_to:vdi -> string = ""
418+
413419
end
414420

415421
(** [get_by_name task name] returns a vdi with [name] (which may be in any SR) *)

storage/storage_skeleton.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ module VDI = struct
7878
let remove_from_sm_config ctx ~dbg ~sr ~vdi ~key = u "VDI.remove_from_sm_config"
7979
let enable_cbt ctx ~dbg ~sr ~vdi = u "VDI.enable_cbt"
8080
let disable_cbt ctx ~dbg ~sr ~vdi = u "VDI.disable_cbt"
81+
let data_destroy ctx ~dbg ~sr ~vdi = u "VDI.data_destroy"
82+
let export_changed_blocks ctx ~dbg ~sr ~vdi_from ~vdi_to = u "VDI.export_changed_blocks"
8183
end
8284

8385
let get_by_name ctx ~dbg ~name = u "get_by_name"

0 commit comments

Comments
 (0)