An apparatus and method for locating free data blocks in a microprocessor-based
system for which snapshots are maintained. The snapshots are stored periodically,
but only a subset of live snapshots is retained in order to reduce the total amount
of storage needed for the snapshot information, such that their snapshot numbers
are not sequential and there are gaps in the snapshot times. For each data block
to be accessed, an allocation time and a deallocation time are stored in an allocation
table. When a data block is needed, its allocation and deallocation times are compared
with the live snapshot times to determine whether that data block is available.
If not, the system iterates through the other data block allocation information
until a free data block is located. If so, the system writes to that data block,
and repeats the procedure as necessary to locate additional free data blocks.