@@ -1110,7 +1110,7 @@ module StorageAPI (R : RPC) = struct
1110
1110
(* * Called on the receiving end
1111
1111
@deprecated This function is deprecated, and is only here to keep backward
1112
1112
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.
1114
1114
*)
1115
1115
let receive_start =
1116
1116
let similar_p = Param. mk ~name: " similar" Mirror. similars in
@@ -1124,12 +1124,30 @@ module StorageAPI (R : RPC) = struct
1124
1124
@-> returning result err
1125
1125
)
1126
1126
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
+ *)
1129
1132
let receive_start2 =
1130
1133
let similar_p = Param. mk ~name: " similar" Mirror. similars in
1131
1134
let result = Param. mk ~name: " result" Mirror. mirror_receive_result in
1132
1135
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" []
1133
1151
(dbg_p
1134
1152
@-> sr_p
1135
1153
@-> VDI. vdi_info_p
@@ -1153,7 +1171,7 @@ module StorageAPI (R : RPC) = struct
1153
1171
(* * [receive_finalize2 dbg id] will stop the mirroring process and compose
1154
1172
the snapshot VDI with the mirror VDI. It also cleans up the storage resources
1155
1173
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 ] *)
1157
1175
let receive_finalize2 =
1158
1176
declare " DATA.MIRROR.receive_finalize2" []
1159
1177
(dbg_p
@@ -1175,7 +1193,7 @@ module StorageAPI (R : RPC) = struct
1175
1193
(dbg_p @-> id_p @-> returning unit_p err)
1176
1194
1177
1195
(* * [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. *)
1179
1197
let receive_cancel2 =
1180
1198
declare " DATA.MIRROR.receive_cancel2" []
1181
1199
(dbg_p @-> id_p @-> url_p @-> verify_dest_p @-> returning unit_p err)
@@ -1279,6 +1297,16 @@ module type MIRROR = sig
1279
1297
-> dbg :debug_info
1280
1298
-> sr :sr
1281
1299
-> 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
1282
1310
-> mirror_id :Mirror .id
1283
1311
-> similar :Mirror .similars
1284
1312
-> vm :vm
@@ -1772,9 +1800,12 @@ module Server (Impl : Server_impl) () = struct
1772
1800
S.DATA.MIRROR. receive_start (fun dbg sr vdi_info id similar ->
1773
1801
Impl.DATA.MIRROR. receive_start () ~dbg ~sr ~vdi_info ~id ~similar
1774
1802
) ;
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
1776
1807
(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
1778
1809
~similar ~vm ~url ~verify_dest
1779
1810
) ;
1780
1811
S.DATA.MIRROR. receive_cancel (fun dbg id ->
0 commit comments