File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -847,6 +847,22 @@ module SMAPIv1 = struct
847847 let data_destroy context =
848848 call_cbt_function context ~f: Sm. vdi_data_destroy ~f_name: " VDI.data_destroy"
849849
850+ let export_changed_blocks context ~dbg ~sr ~vdi_from ~vdi_to =
851+ try
852+ Server_helpers. exec_with_new_task " VDI.export_changed_blocks" ~subtask_of: (Ref. of_string dbg)
853+ (fun __context ->
854+ let vdi_from = find_vdi ~__context sr vdi_from |> fst in
855+ for_vdi ~dbg ~sr ~vdi: vdi_to " VDI.export_changed_blocks"
856+ (fun device_config _type sr vdi_to ->
857+ Sm. vdi_export_changed_blocks device_config _type sr ~vdi_from ~vdi_to
858+ ))
859+ with
860+ | Smint. Not_implemented_in_backend ->
861+ raise (Unimplemented " VDI.export_changed_blocks" )
862+ | Api_errors. Server_error (code , params ) ->
863+ raise (Backend_error (code, params))
864+ | Sm. MasterOnly -> redirect sr
865+
850866 end
851867
852868 let get_by_name context ~dbg ~name = assert false
Original file line number Diff line number Diff line change @@ -592,6 +592,10 @@ module Wrapper = functor(Impl: Server_impl) -> struct
592592 Impl.VDI. disable_cbt context ~dbg ~sr ~vdi
593593 )
594594
595+ let export_changed_blocks context ~dbg ~sr ~vdi_from ~vdi_to =
596+ info " VDI.export_changed_blocks dbg:%s sr:%s vdi_from:%s vdi_to:%s" dbg sr vdi_from vdi_to;
597+ Impl.VDI. export_changed_blocks context ~dbg ~sr ~vdi_from ~vdi_to
598+
595599 end
596600
597601 let get_by_name context ~dbg ~name =
Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ module Debug_print_impl = struct
169169 let enable_cbt context ~dbg ~sr ~vdi = assert false
170170 let disable_cbt context ~dbg ~sr ~vdi = assert false
171171 let data_destroy context ~dbg ~sr ~vdi = assert false
172+ let export_changed_blocks context ~dbg ~sr ~vdi_from ~vdi_to = assert false
172173
173174
174175 end
Original file line number Diff line number Diff line change @@ -264,6 +264,9 @@ module Mux = struct
264264 let data_destroy context ~dbg ~sr ~vdi =
265265 let module C = Client (struct let rpc = of_sr sr end ) in
266266 C.VDI. data_destroy ~dbg ~sr ~vdi
267+ let export_changed_blocks context ~dbg ~sr ~vdi_from ~vdi_to =
268+ let module C = Client (struct let rpc = of_sr sr end ) in
269+ C.VDI. export_changed_blocks ~dbg ~sr ~vdi_from ~vdi_to
267270
268271 end
269272
You can’t perform that action at this time.
0 commit comments