Patent ID: 7647468

Claim:
A method with regard to a computing device partitioned to include a host partition (HP) instantiated at least in part to provide storage capabilities, and also to include a client partition (CP) instantiated at least in part to consume such storage capabilities of the HP in the form of a virtual storage device at the CP, the HP implementing the virtual storage device of the CP as an image file on a physical storage device, the method for the image file at the HP to be compacted while the CP is employing the corresponding virtual storage device and comprising: receiving a command to compact the image file and determining that the CP is active and that the image file is currently in use by the CP to implement the virtual storage device thereof; obtaining from the CP a block layout of the virtual storage device thereof, the block layout representing all allocated data blocks at the virtual storage device that have stored data and correspondingly non-allocated data blocks at the virtual storage device that have null data; retrieving from the image file a block allocation table (BAT) thereof, the BAT representing the image file as stored as blocks at the physical storage device, at least some of the blocks referenced in the BAT having corresponding blocks referenced in the block layout from the CP, and at least some of the blocks referenced in the BAT not having corresponding blocks referenced in such block layout, whereby if a block is referenced in the BAT without a corresponding block in the block layout, such referenced block contains null data and may be deleted from the image file; comparing the block layout from the CP and the BAT from the image file to identify each block referenced in the BAT that does not have a corresponding block in the block layout as an unnecessary block that may be deleted from the image file; creating a modified block layout with each unnecessary block removed therefrom; and compacting the image by identifying from the modified block layout each data block to be removed from the image file and removing such identified data block.