Patent ID: 8280858

Claim:
A non-transitory computer readable storage medium having a computer readable program code embodied therein, the computer readable program code adapted to be executed by a processor to perform a method, the method comprising: loading a scrub queue with a plurality of identifiers corresponding to a plurality of datasets in a storage pool; selecting a first identifier from the scrub queue, wherein the first identifier corresponds to a first dataset, wherein the first dataset is a dataset of the plurality of datasets; initiating a scrubbing of the first dataset, wherein the first dataset is a hierarchical block tree (HBT) comprises: a plurality of data blocks and at least one indirect block, wherein the indirect block comprises a first block pointer that references at least one of the plurality of data blocks, and wherein the first block pointer comprises a birth time associated with the at least one of the plurality of data blocks, and a root block comprising a second block pointer referencing the at least one indirect block, wherein the second block pointer comprises a birth time associated with the at least one indirect block; and upon receiving an indication of a requirement to pause the scrubbing: pausing the scrubbing of the first dataset; creating a bookmark recording of a last location within the first dataset that was scrubbed before pausing the scrubbing of the first dataset; detecting at least one change among the plurality of datasets in the storage pool; and performing a modification to one of the plurality of identifiers in the scrub queue in response to detecting the at least one change.