Skip to content

Commit 377e923

Browse files
committed
Change all receive_start2 to receive_start3
As a new SMAPIv2 call, need to reserve receive_start2 for older versions of xapi (25.3.0 -- 25.17.0) Signed-off-by: Vincent Liu <[email protected]>
1 parent ddea018 commit 377e923

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

ocaml/xapi-idl/storage/storage_interface.ml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -1126,10 +1126,10 @@ module StorageAPI (R : RPC) = struct
11261126

11271127
(** Called on the receiving end to prepare for receipt of the storage. This
11281128
function should be used in conjunction with [receive_finalize2]*)
1129-
let receive_start2 =
1129+
let receive_start3 =
11301130
let similar_p = Param.mk ~name:"similar" Mirror.similars in
11311131
let result = Param.mk ~name:"result" Mirror.mirror_receive_result in
1132-
declare "DATA.MIRROR.receive_start2" []
1132+
declare "DATA.MIRROR.receive_start3" []
11331133
(dbg_p
11341134
@-> sr_p
11351135
@-> VDI.vdi_info_p
@@ -1153,7 +1153,7 @@ module StorageAPI (R : RPC) = struct
11531153
(** [receive_finalize2 dbg id] will stop the mirroring process and compose
11541154
the snapshot VDI with the mirror VDI. It also cleans up the storage resources
11551155
used by mirroring. It is called after the the source VM is paused. This fucntion
1156-
should be used in conjunction with [receive_start2] *)
1156+
should be used in conjunction with [receive_start3] *)
11571157
let receive_finalize2 =
11581158
declare "DATA.MIRROR.receive_finalize2" []
11591159
(dbg_p
@@ -1175,7 +1175,7 @@ module StorageAPI (R : RPC) = struct
11751175
(dbg_p @-> id_p @-> returning unit_p err)
11761176

11771177
(** [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. *)
1178+
done by [receive_start3] on the destination host when the migration fails. *)
11791179
let receive_cancel2 =
11801180
declare "DATA.MIRROR.receive_cancel2" []
11811181
(dbg_p @-> id_p @-> url_p @-> verify_dest_p @-> returning unit_p err)
@@ -1274,7 +1274,7 @@ module type MIRROR = sig
12741274
-> similar:Mirror.similars
12751275
-> Mirror.mirror_receive_result
12761276

1277-
val receive_start2 :
1277+
val receive_start3 :
12781278
context
12791279
-> dbg:debug_info
12801280
-> sr:sr
@@ -1772,9 +1772,9 @@ module Server (Impl : Server_impl) () = struct
17721772
S.DATA.MIRROR.receive_start (fun dbg sr vdi_info id similar ->
17731773
Impl.DATA.MIRROR.receive_start () ~dbg ~sr ~vdi_info ~id ~similar
17741774
) ;
1775-
S.DATA.MIRROR.receive_start2
1775+
S.DATA.MIRROR.receive_start3
17761776
(fun dbg sr vdi_info mirror_id similar vm url verify_dest ->
1777-
Impl.DATA.MIRROR.receive_start2 () ~dbg ~sr ~vdi_info ~mirror_id
1777+
Impl.DATA.MIRROR.receive_start3 () ~dbg ~sr ~vdi_info ~mirror_id
17781778
~similar ~vm ~url ~verify_dest
17791779
) ;
17801780
S.DATA.MIRROR.receive_cancel (fun dbg id ->

ocaml/xapi-idl/storage/storage_skeleton.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ module DATA = struct
169169
let receive_start ctx ~dbg ~sr ~vdi_info ~id ~similar =
170170
u "DATA.MIRROR.receive_start"
171171

172-
let receive_start2 ctx ~dbg ~sr ~vdi_info ~mirror_id ~similar ~vm ~url
172+
let receive_start3 ctx ~dbg ~sr ~vdi_info ~mirror_id ~similar ~vm ~url
173173
~verify_dest =
174-
u "DATA.MIRROR.receive_start2"
174+
u "DATA.MIRROR.receive_start3"
175175

176176
let receive_finalize ctx ~dbg ~id = u "DATA.MIRROR.receive_finalize"
177177

ocaml/xapi-storage-script/main.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,7 @@ let bind ~volume_script_dir =
19221922
S.DP.stat_vdi (u "DP.stat_vdi") ;
19231923
S.DATA.MIRROR.send_start (u "DATA.MIRROR.send_start") ;
19241924
S.DATA.MIRROR.receive_start (u "DATA.MIRROR.receive_start") ;
1925-
S.DATA.MIRROR.receive_start2 (u "DATA.MIRROR.receive_start2") ;
1925+
S.DATA.MIRROR.receive_start3 (u "DATA.MIRROR.receive_start3") ;
19261926
S.DATA.MIRROR.receive_finalize (u "DATA.MIRROR.receive_finalize") ;
19271927
S.DATA.MIRROR.receive_finalize2 (u "DATA.MIRROR.receive_finalize2") ;
19281928
S.DATA.MIRROR.receive_cancel (u "DATA.MIRROR.receive_cancel") ;

ocaml/xapi/storage_migrate.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module MigrateLocal = struct
131131
try
132132
let (module Migrate_Backend) = choose_backend dbg sr in
133133
let similars = similar_vdis ~dbg ~sr ~vdi in
134-
Migrate_Backend.receive_start2 () ~dbg ~sr:dest ~vdi_info:local_vdi
134+
Migrate_Backend.receive_start3 () ~dbg ~sr:dest ~vdi_info:local_vdi
135135
~mirror_id ~similar:similars ~vm:mirror_vm ~url ~verify_dest
136136
with e ->
137137
error "%s Caught error %s while preparing for SXM" __FUNCTION__

ocaml/xapi/storage_mux.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,8 @@ module Mux = struct
837837
Storage_smapiv1_migrate.MIRROR.receive_start () ~dbg ~sr ~vdi_info ~id
838838
~similar
839839

840-
(** see storage_smapiv{1,3}_migrate.receive_start2 *)
841-
let receive_start2 () ~dbg:_ ~sr:_ ~vdi_info:_ ~mirror_id:_ ~similar:_
840+
(** see storage_smapiv{1,3}_migrate.receive_start3 *)
841+
let receive_start3 () ~dbg:_ ~sr:_ ~vdi_info:_ ~mirror_id:_ ~similar:_
842842
~vm:_ =
843843
u __FUNCTION__
844844

ocaml/xapi/storage_smapiv1.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ module SMAPIv1 : Server_impl = struct
11431143
let receive_start _context ~dbg:_ ~sr:_ ~vdi_info:_ ~id:_ ~similar:_ =
11441144
assert false
11451145

1146-
let receive_start2 _context ~dbg:_ ~sr:_ ~vdi_info:_ ~mirror_id:_
1146+
let receive_start3 _context ~dbg:_ ~sr:_ ~vdi_info:_ ~mirror_id:_
11471147
~similar:_ ~vm:_ ~url:_ ~verify_dest:_ =
11481148
assert false
11491149

ocaml/xapi/storage_smapiv1_migrate.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ module MIRROR : SMAPIv2_MIRROR = struct
680680
(* The state tracking here does not need to be changed, however, it will be
681681
stored in memory on different hosts. If receive_start is called, by an older
682682
host, this State.add is run on the destination host. On the other hand, if
683-
receive_start2 is called, this will be stored in memory on the source host.
683+
receive_start3 is called, this will be stored in memory on the source host.
684684
receive_finalize2 and receive_cancel2 handles this similarly. *)
685685
State.add id
686686
State.(
@@ -724,7 +724,7 @@ module MIRROR : SMAPIv2_MIRROR = struct
724724
receive_start_common ~dbg ~sr ~vdi_info ~id ~similar ~vm:(Vm.of_string "0")
725725
(module Local)
726726

727-
let receive_start2 _ctx ~dbg ~sr ~vdi_info ~mirror_id ~similar ~vm ~url
727+
let receive_start3 _ctx ~dbg ~sr ~vdi_info ~mirror_id ~similar ~vm ~url
728728
~verify_dest =
729729
D.debug "%s dbg: %s sr: %s vdi: %s id: %s vm: %s url: %s verify_dest: %B"
730730
__FUNCTION__ dbg (s_of_sr sr)

ocaml/xapi/storage_smapiv1_wrapper.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ functor
12001200
(String.concat "," similar) ;
12011201
Impl.DATA.MIRROR.receive_start context ~dbg ~sr ~vdi_info ~id ~similar
12021202

1203-
let receive_start2 _context ~dbg:_ ~sr:_ ~vdi_info:_ ~mirror_id:_
1203+
let receive_start3 _context ~dbg:_ ~sr:_ ~vdi_info:_ ~mirror_id:_
12041204
~similar:_ ~vm:_ =
12051205
u __FUNCTION__
12061206

ocaml/xapi/storage_smapiv3_migrate.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module MIRROR : SMAPIv2_MIRROR = struct
2929

3030
let receive_start _ctx = u __FUNCTION__
3131

32-
let receive_start2 _ctx = u __FUNCTION__
32+
let receive_start3 _ctx = u __FUNCTION__
3333

3434
let receive_finalize _ctx = u __FUNCTION__
3535

0 commit comments

Comments
 (0)