CPC G06F 12/0253 (2013.01) | 16 Claims |
1. A storage device, comprising:
a non-volatile memory including a plurality of first blocks, a plurality of second blocks, and a plurality of third blocks; and
a controller configured to:
allocate a first sub-drive and a second sub-drive in the non-volatile memory, wherein the first sub-drive includes a first plurality of superblocks for storing data overwrites associated with a zoned namespace (ZNS) and for storing other data associated with a namespace other than the ZNS, the first plurality of superblocks including the first superblock, wherein the second sub-drive includes a second plurality of superblocks for storing sequential data associated with the ZNS, the second plurality of superblocks in the second sub-drive including the second superblock and the third superblock;
create a first superblock including the first blocks, a second superblock including the second blocks;
determine whether a total quantity of data in the first sub-drive exceeds a threshold percentage of a capacity of the non-volatile memory, the total quantity including at least the first quantity and the second quantity;
relocate, during a first garbage collection for a first zone prior to a second garbage collection for a second zone, first data overwrites associated with the first zone from the first superblock in the first sub-drive to the second superblock in the second sub-drive in response to the total quantity exceeding the threshold percentage, the first zone including a first range of logical addresses, and the second zone including a second range of logical addresses different than the first range of logical addresses; and
relocate, during the second garbage collection, the second data overwrites from the first superblock in the first sub-drive to the third superblock in the second sub-drive in response to the total quantity of the data in the first sub-drive continuing to exceed the threshold percentage after the first garbage collection,
wherein the first garbage collection occurs prior to the second garbage collection in response to a first quantity of the first data overwrites in the first superblock being larger than a second quantity of second data overwrites associated with the second zone in the first superblock.
|