@@ -453,6 +453,9 @@ functor
453
453
List. fold_left perform_one vdi_t ops
454
454
455
455
let perform_nolock context ~dbg ~dp ~sr ~vdi ~vm this_op =
456
+ debug " perform_nolock dp=%s, sr=%s, vdi=%s, vm=%s, op=%s" dp
457
+ (s_of_sr sr) (s_of_vdi vdi) (s_of_vm vm)
458
+ (Vdi_automaton. string_of_op this_op) ;
456
459
match Host. find sr ! Host. host with
457
460
| None ->
458
461
raise (Storage_error (Sr_not_attached (s_of_sr sr)))
@@ -473,6 +476,15 @@ functor
473
476
superstate to superstate'. These may fail: if so we revert the
474
477
datapath+VDI state to the most appropriate value. *)
475
478
let ops = Vdi_automaton. ( - ) superstate superstate' in
479
+ debug " perform_nolock %s -> %s: %s"
480
+ (Vdi_automaton. string_of_state superstate)
481
+ (Vdi_automaton. string_of_state superstate')
482
+ (String. concat " , "
483
+ (List. map
484
+ (fun (op , _ ) -> Vdi_automaton. string_of_op op)
485
+ ops
486
+ )
487
+ ) ;
476
488
side_effects context dbg dp sr sr_t vdi vdi_t vm ops
477
489
with e ->
478
490
let e =
@@ -529,7 +541,8 @@ functor
529
541
)
530
542
with e ->
531
543
if not allow_leak then (
532
- ignore (Vdi. add_leaked dp vdi_t) ;
544
+ Sr. add_or_replace vdi (Vdi. add_leaked dp vdi_t) sr_t ;
545
+ Everything. to_file ! host_state_path (Everything. make () ) ;
533
546
raise e
534
547
) else (
535
548
(* allow_leak means we can forget this dp *)
0 commit comments