Skip to content

Commit

Permalink
xenopsd: remove unused subtask parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Pau Ruiz Safont <[email protected]>
  • Loading branch information
psafont committed Dec 19, 2024
1 parent e8bde26 commit a899232
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions ocaml/xenopsd/lib/xenops_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ let with_tracing ~name ~task f =
warn "Failed to start tracing: %s" (Printexc.to_string e) ;
f ()

let rec perform_atomic ~progress_callback ?subtask:_ ?result (op : atomic)
let rec perform_atomic ~progress_callback ?result (op : atomic)
(t : Xenops_task.task_handle) : unit =
let module B = (val get_backend () : S) in
with_tracing ~name:(name_of_atomic op) ~task:t @@ fun () ->
Expand Down Expand Up @@ -2396,7 +2396,7 @@ let perform_atomics atomics t =
progress_callback progress (weight /. total_weight) t
in
debug "Performing: %s" (string_of_atomic x) ;
perform_atomic ~subtask:(string_of_atomic x) ~progress_callback x t ;
perform_atomic ~progress_callback x t ;
progress_callback 1. ;
progress +. (weight /. total_weight)
)
Expand Down Expand Up @@ -2530,8 +2530,7 @@ and trigger_cleanup_after_failure_atom op t =
| VM_import_metadata _ ->
()

and perform_exn ?subtask ?result (op : operation) (t : Xenops_task.task_handle)
: unit =
and perform_exn ?result (op : operation) (t : Xenops_task.task_handle) : unit =
let module B = (val get_backend () : S) in
with_tracing ~name:(name_of_operation op) ~task:t @@ fun () ->
match op with
Expand Down Expand Up @@ -2658,9 +2657,7 @@ and perform_exn ?subtask ?result (op : operation) (t : Xenops_task.task_handle)
(id, vm.Vm.memory_dynamic_min, vm.Vm.memory_dynamic_min)
in
let (_ : unit) =
perform_atomic ~subtask:(string_of_atomic atomic)
~progress_callback:(fun _ -> ())
atomic t
perform_atomic ~progress_callback:(fun _ -> ()) atomic t
in
(* Waiting here is not essential but adds a degree of safety and
reducess unnecessary memory copying. *)
Expand Down Expand Up @@ -3172,7 +3169,7 @@ and perform_exn ?subtask ?result (op : operation) (t : Xenops_task.task_handle)
VUSB_DB.signal id
| Atomic op ->
let progress_callback = progress_callback 0. 1. t in
perform_atomic ~progress_callback ?subtask ?result op t
perform_atomic ~progress_callback ?result op t

and verify_power_state op =
let module B = (val get_backend () : S) in
Expand Down Expand Up @@ -3201,7 +3198,7 @@ and perform ?subtask ?result (op : operation) (t : Xenops_task.task_handle) :
unit =
let one op =
verify_power_state op ;
try perform_exn ?subtask ?result op t
try perform_exn ?result op t
with e ->
Backtrace.is_important e ;
info "Caught %s executing %s: triggering cleanup actions"
Expand Down

0 comments on commit a899232

Please sign in to comment.