@@ -1110,7 +1110,7 @@ module StorageAPI (R : RPC) = struct
11101110 (* * Called on the receiving end
11111111 @deprecated This function is deprecated, and is only here to keep backward
11121112 compatibility with old xapis that call Remote.DATA.MIRROR.receive_start during SXM.
1113- Use the receive_start2 function instead.
1113+ Use the receive_start3 function instead.
11141114 *)
11151115 let receive_start =
11161116 let similar_p = Param. mk ~name: " similar" Mirror. similars in
@@ -1124,12 +1124,30 @@ module StorageAPI (R : RPC) = struct
11241124 @-> returning result err
11251125 )
11261126
1127- (* * Called on the receiving end to prepare for receipt of the storage. This
1128- function should be used in conjunction with [receive_finalize2]*)
1127+ (* * Called on the receiving end
1128+ @deprecated This function is deprecated, and is only here to keep backward
1129+ compatibility with old xapis that call Remote.DATA.MIRROR.receive_start2 during SXM.
1130+ Use the receive_start3 function instead.
1131+ *)
11291132 let receive_start2 =
11301133 let similar_p = Param. mk ~name: " similar" Mirror. similars in
11311134 let result = Param. mk ~name: " result" Mirror. mirror_receive_result in
11321135 declare " DATA.MIRROR.receive_start2" []
1136+ (dbg_p
1137+ @-> sr_p
1138+ @-> VDI. vdi_info_p
1139+ @-> id_p
1140+ @-> similar_p
1141+ @-> vm_p
1142+ @-> returning result err
1143+ )
1144+
1145+ (* * Called on the receiving end to prepare for receipt of the storage. This
1146+ function should be used in conjunction with [receive_finalize2]*)
1147+ let receive_start3 =
1148+ let similar_p = Param. mk ~name: " similar" Mirror. similars in
1149+ let result = Param. mk ~name: " result" Mirror. mirror_receive_result in
1150+ declare " DATA.MIRROR.receive_start3" []
11331151 (dbg_p
11341152 @-> sr_p
11351153 @-> VDI. vdi_info_p
@@ -1153,7 +1171,7 @@ module StorageAPI (R : RPC) = struct
11531171 (* * [receive_finalize2 dbg id] will stop the mirroring process and compose
11541172 the snapshot VDI with the mirror VDI. It also cleans up the storage resources
11551173 used by mirroring. It is called after the the source VM is paused. This fucntion
1156- should be used in conjunction with [receive_start2 ] *)
1174+ should be used in conjunction with [receive_start3 ] *)
11571175 let receive_finalize2 =
11581176 declare " DATA.MIRROR.receive_finalize2" []
11591177 (dbg_p
@@ -1175,7 +1193,7 @@ module StorageAPI (R : RPC) = struct
11751193 (dbg_p @-> id_p @-> returning unit_p err)
11761194
11771195 (* * [receive_cancel2 dbg mirror_id url verify_dest] cleans up the side effects
1178- done by [receive_start2 ] on the destination host when the migration fails. *)
1196+ done by [receive_start3 ] on the destination host when the migration fails. *)
11791197 let receive_cancel2 =
11801198 declare " DATA.MIRROR.receive_cancel2" []
11811199 (dbg_p @-> id_p @-> url_p @-> verify_dest_p @-> returning unit_p err)
@@ -1279,6 +1297,16 @@ module type MIRROR = sig
12791297 -> dbg :debug_info
12801298 -> sr :sr
12811299 -> vdi_info :vdi_info
1300+ -> id :Mirror .id
1301+ -> similar :Mirror .similars
1302+ -> vm :vm
1303+ -> Mirror .mirror_receive_result
1304+
1305+ val receive_start3 :
1306+ context
1307+ -> dbg :debug_info
1308+ -> sr :sr
1309+ -> vdi_info :vdi_info
12821310 -> mirror_id :Mirror .id
12831311 -> similar :Mirror .similars
12841312 -> vm :vm
@@ -1772,9 +1800,12 @@ module Server (Impl : Server_impl) () = struct
17721800 S.DATA.MIRROR. receive_start (fun dbg sr vdi_info id similar ->
17731801 Impl.DATA.MIRROR. receive_start () ~dbg ~sr ~vdi_info ~id ~similar
17741802 ) ;
1775- S.DATA.MIRROR. receive_start2
1803+ S.DATA.MIRROR. receive_start2 (fun dbg sr vdi_info id similar vm ->
1804+ Impl.DATA.MIRROR. receive_start2 () ~dbg ~sr ~vdi_info ~id ~similar ~vm
1805+ ) ;
1806+ S.DATA.MIRROR. receive_start3
17761807 (fun dbg sr vdi_info mirror_id similar vm url verify_dest ->
1777- Impl.DATA.MIRROR. receive_start2 () ~dbg ~sr ~vdi_info ~mirror_id
1808+ Impl.DATA.MIRROR. receive_start3 () ~dbg ~sr ~vdi_info ~mirror_id
17781809 ~similar ~vm ~url ~verify_dest
17791810 ) ;
17801811 S.DATA.MIRROR. receive_cancel (fun dbg id ->
0 commit comments