Patent attributes
Techniques for providing efficient space management in writable snapshots are disclosed. The techniques include dividing available storage in a filesystem into one or more contiguous allocation unit (AU) chunks. Each AU chunk includes a set of contiguous fixed-size AUs, wherein each AU includes a series of contiguous fixed-size blocks. Each AU chunk also includes a set of contiguous AU mappings, wherein each AU mapping represents a different AU. The techniques also include storing, in a first AU mapping, a first snapshot identifier for a snapshot of the filesystem to indicate allocation of a first AU represented by the first AU mapping to the snapshot. The techniques further include allocating a first block in the first AU to the snapshot by incrementing, in the first AU mapping, a reference count that tracks a number of blocks in the first AU that are allocated to the snapshot.