Patent ID: 7584229

Claim:
A method for priority-based allocation in a storage pool, comprising: receiving a first request to write a first data item in the storage pool, wherein the storage pool comprises a physical disk, wherein the physical disk comprises a plurality of metaslabs, and wherein each of the plurality of metaslabs comprises a contiguous region of data; determining a first target metaslab selected from the plurality of metaslabs by comparing a first plurality of allocation priorities, wherein each of the first plurality of allocation priorities is associated with one of the plurality of metaslabs; allocating a first block to the first target metaslab; writing the first block to the first target metaslab; dynamically modifying an allocation priority selected from the first plurality of allocation priorities according to a block allocation policy after writing the first block to the target metaslab to obtain a modified first plurality of allocation priorities, wherein the first block comprises a first portion of the first data item; determining a second target metaslab selected from the plurality of metaslabs by comparing the modified first plurality of allocation priorities; allocating a second block to the second target metaslab; and writing the second block to the second target metaslab, wherein the second block comprises a second portion of the first data item.