(fun () ->
if (check_enclosing_sr_for_capability __context Smint.Vdi_activate self) then
begin
- if mode=`RW then debug "foo";
Sm.call_sm_vdi_functions ~__context ~vdi:self
(fun device_config sr_type sr ->
Sm.vdi_activate device_config sr_type sr self (mode = `RW));
(* CA-15824: we decrement refcount whether or not deactivate call is succesful *)
ignore (decrement_activate_refcount self); (* caps at 0 *)
- debug "Considering execute deactive on VDI '%s'; activate refcount now: %d" (Ref.string_of self) activate_refcount;
+ debug "Considering execute deactivate on VDI '%s'; activate refcount now: %d" (Ref.string_of self) activate_refcount;
if activate_refcount<=1 then (* do deactivate on 1->0 transition, but also allow detach through if we're already at 0.. *)
begin
if activate_refcount<1 then
(** Take an internal VM record and a proposed operation, return true if the operation
would be acceptable *)
let check_operation_error ~vmr ~vmgmr ~ref ~clone_suspended_vm_enabled vdis_reset_and_caching ~op =
- debug "Check operation error: op=%s" (Record_util.vm_operation_to_string op);
- debug "vdis_reset_and_caching: [%s]" (String.concat ";" (List.map (fun (a,b) -> (Printf.sprintf "(%b,%b)" a b)) vdis_reset_and_caching));
let ref_str = Ref.string_of ref in
let power_state = vmr.Db_actions.vM_power_state in
let current_ops = vmr.Db_actions.vM_current_operations in