Patent ID: 8862810

Claim:
A method for processing a write operation for a solid-state drive (SSD) having solid-state memory, the method comprising: determining one or more vdevs that have not exceeded an End of Life threshold, wherein the one or more vdevs that have not exceeded an End of Life threshold comprise a queue of vdevs; determining a Program/Erase (P/E) count and an average physical free space for each vdev from the queue of vdevs; identifying among the P/E counts a maximum P/E count and a minimum P/E count; determining a difference in value between the maximum P/E count and minimum P/E count; where the determined difference is greater than a P/E count threshold and the vdev with the minimum P/E count possesses sufficient logical free space for the write operation, performing the write operation on the vdev from the queue of vdevs with the minimum P/E count; and where the determined difference is less than or equal to the P/E count threshold, selecting a vdev from the beginning of the queue of vdevs; where the average physical free space of the selected vdev is below an over-provisioning threshold, (a) electing the first available vdev from the queue that possesses a garbage collection wait timer whose value is zero, (b) where the average physical free space of the elected vdev is below the over-provisioning threshold, initiating a garbage collection procedure on the elected logical device, (c) where the average physical free space of the elected vdev is above the over-provisioning threshold, performing the write operation on the elected vdev, and repeating (a), (b), and (c) until an elected vdev is above the over-provisioning threshold.