Skip to content

Commit

Permalink
Write in the maxsize when resizing after thin provision check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Ludlam committed Dec 16, 2013
1 parent ef6339e commit 86cc34f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vhd/vhdSlave.ml
Expand Up @@ -815,6 +815,9 @@ module SR = struct
if Filename.basename (old_savi.savi_attach_info.sa_leaf_path) = ai.dmn_dm_name
then begin
Host.change_lv (Mlvm ai);
let sectors = List.fold_left (fun acc x -> Int64.add acc x.Camldm.len) 0L (Array.to_list ai.dmn_mapping.Camldm.m) in
let maxsize = Int64.mul sectors 512L in
Tapdisk_listen.write_maxsize (metadata.s_data.s_sr,vdi) maxsize;
(if old_savi.savi_paused then
(debug "Resuming tapdisk: id=%s" vdi;
Tapdisk.activate old_savi.savi_blktap2_dev metadata.s_data.s_sr vdi old_savi.savi_attach_info.sa_leaf_path
Expand Down

0 comments on commit 86cc34f

Please sign in to comment.