# HG changeset patch # User Jonathan Ludlam # Date 1265280002 0 # Node ID 2c3e719dc302c1f1fbf39889a46c26685ce9497a # Parent 0d59cd0c7c77da51605a4df1fab8e9ffbd382c36 CA-37337: Make sure we can't VBD.plug while lvhd_stop_using_these_vdis is in progress Signed-off-by: Jon Ludlam diff -r 0d59cd0c7c77 -r 2c3e719dc302 ocaml/xapi/xapi_vbd_helpers.ml --- a/ocaml/xapi/xapi_vbd_helpers.ml Wed Feb 03 16:46:24 2010 +0000 +++ b/ocaml/xapi/xapi_vbd_helpers.ml Thu Feb 04 10:40:02 2010 +0000 @@ -136,10 +136,7 @@ if not vdi_record.Db_actions.vDI_managed then set_errors Api_errors.vdi_not_managed [ _ref ] all_ops; - let operations_not_allowed_when_vdi_is_busy = - List.exists (fun x -> List.mem x current_ops) [ `attach; `plug; `insert ] in - - if operations_not_allowed_when_vdi_is_busy && vdi_record.Db_actions.vDI_current_operations <> [] then begin + if vdi_record.Db_actions.vDI_current_operations <> [] then begin debug "VBD operation %s not allowed because VDI.current-operations = [ %s ]" (String.concat ";" (List.map vbd_operation_to_string current_ops)) (String.concat "; "