File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -269,18 +269,12 @@ let safe_destroy_vdi ~__context ~rpc ~session_id vdi =
269269(* This operation destroys the data of the dest VM. *)
270270let update_vifs_vbds_and_vgpus ~__context ~snapshot ~vm =
271271 let snap_vbds = Db.VM. get_VBDs ~__context ~self: snapshot in
272- let snap_vbds_without_cd = List. filter (fun vbd -> Db.VBD. get_type ~__context ~self: vbd <> `CD ) snap_vbds in
273- let snap_vdis = List. map (fun vbd -> Db.VBD. get_VDI ~__context ~self: vbd) snap_vbds_without_cd in
274- let vdi_snap_of = List. map (fun vdi -> Db.VDI. get_snapshot_of ~__context ~self: vdi) snap_vdis in
275272 let snap_vifs = Db.VM. get_VIFs ~__context ~self: snapshot in
276273 let snap_vgpus = Db.VM. get_VGPUs ~__context ~self: snapshot in
277274 let snap_suspend_VDI = Db.VM. get_suspend_VDI ~__context ~self: snapshot in
278275
279276 let vm_VBDs = Db.VM. get_VBDs ~__context ~self: vm in
280- (* Filter VBDs to ensure that we don't read empty CDROMs *)
281- let vbds_without_cd = List. filter (fun vbd -> Db.VBD. get_type ~__context ~self: vbd <> `CD ) vm_VBDs in
282- let vm_VDIs = List. map (fun vbd -> Db.VBD. get_VDI ~__context ~self: vbd) vbds_without_cd in
283- let vm_VDIs = List. filter (fun vdi -> List. mem vdi vdi_snap_of) vm_VDIs in
277+ let vm_VDIs = List. map (fun vbd -> Db.VBD. get_VDI __context vbd) vm_VBDs in
284278 let vm_VIFs = Db.VM. get_VIFs ~__context ~self: vm in
285279 let vm_VGPUs = Db.VM. get_VGPUs ~__context ~self: vm in
286280 let vm_suspend_VDI = Db.VM. get_suspend_VDI ~__context ~self: vm in
You can’t perform that action at this time.
0 commit comments