Patent ID: 7290013

Claim:
A method for improved space allocation in a file system having a set of storage blocks in a mass storage system, including maintaining an active map of said storage blocks not available for writing data; generating, for each one of a plurality of regions of said storage blocks in said mass storage system, a value indicative of a number of storage blocks available for writing data in said region, based on said active map and at least one snapshot of the file system, each said region including a plurality of storage blocks in the active file system and a plurality of storage blocks in each of said at least one snapshot, each said at least one snapshot of the file system having a copy of said active map as said active map existed at a previous time; and setting an allocation threshold based on a number of storage blocks available for writing data in the file system; comparing the values to the allocation threshold; selecting one of said plurality of regions for which the corresponding value has a specified relationship to the allocation threshold; and writing the data into the selected one of said plurality of regions.