Patent ID: 8589447

Claim:
A method of efficiently generating metadata for data blocks shared by multiple data containers in a storage object, the method comprising: comparing, by a network storage server, metadata associated with a first data container in a first dataset to metadata associated with a corresponding second data container in a second dataset, wherein the first dataset and the second dataset represent states of the storage object at different points-in-time and the first dataset is an earlier point-in-time representation of the storage object as compared to the second dataset, and wherein the first data container and the second data container reference a plurality of data blocks stored in the storage object, wherein said comparing of metadata associated with the first and second data containers includes comparing each data block listed in a buffer tree representing the first data set against a listing of data blocks included in a buffer tree representing the second data set; identifying, by the network storage server, non-identical data blocks from data blocks referenced by the first data container, wherein the non-identical data blocks are data blocks that do not match against any of the data blocks listed in the buffer tree representing the second data container; generating, by the network storage server, new metadata selectively only for the non-identical data blocks of the first data container when performing a first metadata scan of the first dataset and a second metadata scan of the second data container in parallel; detecting a deletion of the second dataset including the second data container prior to a completion of the second metadata scan; and performing a complete metadata scan for the first data container during the first metadata scan, if a metadata scan for the second data container was not completed during execution of the second metadata scan.