@@ -449,12 +449,12 @@ let hard_shutdown_wait (task: Xenops_task.t) ~xs ~timeout x =
449
449
let (_: bool ) = cancellable_watch (Device x) [ Watch. map (fun _ -> () ) (hard_shutdown_complete ~xs x) ] [] task ~xs ~timeout () in
450
450
()
451
451
452
- let release (task : Xenops_task.t ) ~xs (x : device ) =
452
+ let release (task : Xenops_task.t ) ~xc ~ xs (x : device ) =
453
453
debug " Device.Vbd.release %s" (string_of_device x);
454
454
(* Make sure blktap/blkback fire the udev remove event by deleting the
455
455
backend now *)
456
456
Generic. safe_rm ~xs (backend_path_of_device ~xs x);
457
- Hotplug. release task ~xs x;
457
+ Hotplug. release task ~xc ~ xs x;
458
458
459
459
if ! Xenopsd. run_hotplug_scripts
460
460
then Hotplug. run_hotplug_script x [ " remove" ];
@@ -555,7 +555,7 @@ let add_async ~xs ~hvm x domid =
555
555
Generic. add_device ~xs device back front priv [] ;
556
556
device
557
557
558
- let add_wait (task : Xenops_task.t ) ~xs device =
558
+ let add_wait (task : Xenops_task.t ) ~xc ~ xs device =
559
559
if ! Xenopsd. run_hotplug_scripts
560
560
then Hotplug. run_hotplug_script device [ " add" ];
561
561
@@ -577,15 +577,15 @@ let add_wait (task: Xenops_task.t) ~xs device =
577
577
with Hotplug. Frontend_device_error _ as e ->
578
578
debug " Caught Frontend_device_error: assuming it is safe to shutdown the backend" ;
579
579
clean_shutdown task ~xs device; (* assumes double-failure isn't possible *)
580
- release task ~xs device;
580
+ release task ~xc ~ xs device;
581
581
raise e
582
582
end ;
583
583
device
584
584
585
585
(* Add the VBD to the domain, When this command returns, the device is ready. (This isn't as
586
586
concurrent as xend-- xend allocates loopdevices via hotplug in parallel and then
587
587
performs a 'waitForDevices') *)
588
- let add (task : Xenops_task.t ) ~xs ~hvm x domid =
588
+ let add (task : Xenops_task.t ) ~xc ~ xs ~hvm x domid =
589
589
let device =
590
590
let result = ref None in
591
591
while ! result = None do
@@ -597,7 +597,7 @@ let add (task: Xenops_task.t) ~xs ~hvm x domid =
597
597
Thread. delay 0.1
598
598
end else raise e (* permanent failure *)
599
599
done ; Opt. unbox ! result in
600
- add_wait task ~xs device
600
+ add_wait task ~xc ~ xs device
601
601
602
602
let qemu_media_change ~xs device _type params =
603
603
let backend_path = (backend_path_of_device ~xs device) in
@@ -739,15 +739,15 @@ let set_carrier ~xs (x: device) carrier =
739
739
let disconnect_path = disconnect_path_of_device ~xs x in
740
740
xs.Xs. write disconnect_path (if carrier then " 0" else " 1" )
741
741
742
- let release (task : Xenops_task.t ) ~xs (x : device ) =
742
+ let release (task : Xenops_task.t ) ~xc ~ xs (x : device ) =
743
743
debug " Device.Vif.release %s" (string_of_device x);
744
744
745
745
if ! Xenopsd. run_hotplug_scripts then begin
746
746
let tap = { x with backend = { x.backend with kind = Tap } } in
747
747
Hotplug. run_hotplug_script x [ " remove" ];
748
748
Hotplug. run_hotplug_script tap [ " remove" ];
749
749
end ;
750
- Hotplug. release task ~xs x
750
+ Hotplug. release task ~xc ~ xs x
751
751
752
752
let move ~xs (x : device ) bridge =
753
753
let xs_bridge_path = Device_common. get_private_data_path_of_device x ^ " /bridge" in
0 commit comments