Skip to content

Commit c419338

Browse files
committed
VDI.data_destroy: reset the VDI's content_id
to a special constant. The content_id of the data_destroyed VDI has to be different from its old content_id and the content_ids of all the other VDIs with data, to ensure that we won't select it as the base VDI during storage motion. Since the data of the VDI has been destroyed, it should be considered different from all other VDIs that have data. Signed-off-by: Gabor Igloi <[email protected]>
1 parent dcb01ce commit c419338

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ocaml/xapi/storage_access.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,9 @@ module SMAPIv1 = struct
844844
let disable_cbt context =
845845
call_cbt_function context ~f:Sm.vdi_disable_cbt ~f_name:"VDI.disable_cbt"
846846

847-
let data_destroy context =
848-
call_cbt_function context ~f:Sm.vdi_data_destroy ~f_name:"VDI.data_destroy"
847+
let data_destroy context ~dbg ~sr ~vdi =
848+
call_cbt_function context ~f:Sm.vdi_data_destroy ~f_name:"VDI.data_destroy" ~dbg ~sr ~vdi;
849+
set_content_id context ~dbg ~sr ~vdi ~content_id:"/No content: this is a cbt_metadata VDI/"
849850

850851
let export_changed_blocks context ~dbg ~sr ~vdi_from ~vdi_to =
851852
try

0 commit comments

Comments
 (0)