Patent ID: 7979395

Claim:
A method comprising: creating a plurality of snapshots of data stored in a storage system, each of the snapshots using one or more blocks, wherein a particular snapshot is 010 invariant if each block in the snapshot is 010 invariant, and wherein a block is 010 invariant if, once that block becomes used, and later becomes unused, that block is not used again; storing the plurality of snapshots; selecting a set of snapshots to be deleted; determining, for the set of snapshots to be deleted, the number of blocks which are reclaimable if the set of snapshots are deleted, by determining the number of blocks which are exclusive to the set of snapshots to be deleted, wherein determining if a block is exclusive to the set of snapshots to be deleted includes: if the set of snapshots are 010 invariant, comparing snapshots in the set to adjacent-in-time snapshots not in the set, for each block used in a snapshot in the set, determining whether the block is used by any of the adjacent-in-time snapshots not in the set, and determining that the block is exclusive to the set of snapshots if the block is not used by any of the adjacent-in-time snapshots not in the set; and if the set of snapshots are not 010 invariant, comparing snapshots in the set to all snapshots not in the set, for each block used in a snapshot in the set, determining whether the block is used by any of the snapshots not in the set, and determining that the block is exclusive to the set of snapshots if the block is not used by any of the snapshots not in the set; and deleting the set of snapshots, said deleting including reclaiming those blocks that are exclusive to the set of snapshots.