×

Virtual block devices

  • US 9,069,806 B2
  • Filed: 03/14/2013
  • Issued: 06/30/2015
  • Est. Priority Date: 03/27/2012
  • Status: Active Grant
First Claim
Patent Images

1. A method performed by data processing apparatus, the method comprising:

  • receiving a request to initialize a virtual machine, the virtual machine having an associated persistent virtual block device, wherein the persistent virtual block device is realized using a plurality of data files maintained by a file system and a persistent file map comprising a plurality of file map entries, each file map entry associating a respective block of the virtual block device with a respective position within a respective data file maintained by the file system to which the block was written, and wherein each of the blocks is written to the respective data file in association with metadata that identifies the block and a respective sequence number for a write request that resulted in the block being written to the position; and

    initializing the file map for use by the virtual machine, wherein initializing the file map for use by the virtual machine comprises determining whether the file map is up to date with respect to the file system for each of the blocks of the persistent virtual block device identified in the file map, comprising;

    determining that a size of a particular file of the plurality of data files maintained by the file system exceeds a size indicated by metadata associated with the file map for the particular file;

    scanning a tail of the particular file to identify blocks allocated to the virtual block device written to the tail of the particular file, wherein the tail of the particular file is the portion of the particular file that exceeds the size indicated by the metadata;

    identifying, from the scanning, that a new version of a particular block that is associated with an initial position in the file map has been written to a new position in the tail of the particular filedetermining, by comparing a sequence number stored in association with the particular block at the new position to a sequence number stored in association with the initial position, that the particular block was written to the new position subsequent to being written to the initial position indicated by the file map; and

    updating the position associated with the particular block in the file map to the new position.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×