BACKGROUND OF THE DISCLOSURE

Field of the Disclosure

Embodiments of the present disclosure generally relate to storage devices, such as solid state drives (SSDs).

Description of the Related Art

Storage devices, such as SSDs, may be used in computers in applications where relatively low latency and high capacity storage are desired. For example, SSDs may exhibit lower latency, particularly for random reads and writes, than hard disk drives (HDDs). Typically, a controller of the SSD receives a command to read or write data from a host device to a memory device. The data is read and written to one or more erase blocks in the memory device. Each of the erase blocks is associated with a logical block address so that the SSD and/or the host device know the location of where the data, such as user data, parity data, metadata, and other applicable data, is stored. A logical to physical address (L2P) table stored in volatile memory of the SSD associates the LBA of the data to a physical address of where the data is stored in the SSD when the data is written. One or more erase blocks may be grouped together by their respective logical block addresses to form a plurality of zones.

Typically, one die or plane of a die in each zone is dedicated to storing parity data for the zone. As a command is received by the storage device to write data to a particular zone, the data associated with the command is written to the memory device, and parity data is simultaneously generated for the data in order to protect the data. Furthermore, data in flight, such as data not yet written to the memory device, may also be stored in a dedicated die or a dedicated plane of a die in each zone. The parity data and the data in flight are then stored in random-access memory (RAM) within the storage device.

However, the storage device generally comprises a very limited amount of RAM, as RAM is expensive from cost and total system design perspective. Since parity data is generated for each write command received, the parity data takes up a lot of the valuable RAM space, which may reduce the amount of RAM space available for other data, or may require a greater amount of RAM to be included in the storage device. Furthermore, data in flight may aggregate to a sizable amount and require a greater amount of RAM to be included in the storage device. Since RAM is volatile memory, data is lost when the device loses power. Thus, data storage reliability may be hindered and valuable information may be lost.

Therefore, what is needed is a new method of power fail protecting data in a storage device.

SUMMARY OF THE DISCLOSURE

The present disclosure generally relates to methods of operating storage devices. The storage device comprises a controller comprising first random access memory (RAM1), second random access memory (RAM2), and a storage unit divided into a plurality of zones. When a write command is received to write data to a zone, change log data is generated and stored in the RAM1, the previous delta data for the zone is copied from the RAM2 to the RAM1 to be updated with the change log data, and the updated delta data is copied to the RAM2. The delta data stored in the RAM2 is copied to the storage unit periodically. The controller tracks which delta data has been copied to the RAM2 and to the storage unit. During a power failure, the delta data and the change log data are copied from the RAM1 or the RAM2 to the storage unit.

In one embodiment, a storage device comprises a non-volatile storage unit, wherein a capacity of the non-volatile storage unit is divided into a plurality of zones, and wherein the non-volatile storage unit comprises a plurality of dies. Each of the plurality of dies comprising a plurality of erase blocks. The storage device further comprising a first volatile memory unit, a controller coupled to the non-volatile storage unit and the first volatile unit, and a second volatile memory unit. The controller is configured to receive one or more commands to write data to a first zone of the plurality of zones, generate change log data for the first zone in a temporary location in the second volatile memory unit, and copy the change log data for the first zone to the non-volatile storage unit upon experiencing a power failure event.

In another embodiment, a storage device comprises a non-volatile storage unit, wherein a capacity of the non-volatile storage unit is divided into a plurality of zones, and wherein the non-volatile storage unit comprises a plurality of dies. Each of the plurality of dies comprising a plurality of erase blocks. The storage device further comprising a first volatile memory unit comprising a plurality of ranks, wherein the plurality of ranks are divided into one or more sections. The storage device comprising a controller coupled to the non-volatile storage unit and the first volatile memory unit. The controller comprising a second volatile memory unit. The controller is configured to receive one or more write commands to write data to one or more zones of the plurality of zones, update delta data associated with at least one zone of the one or more zones for each of the one or more write commands received in the second volatile memory unit, wherein delta data is updated for a particular zone each time a command is received to write data to the particular zone, copy the updated delta data with the at least one zone from the second volatile memory unit to the plurality of ranks of the first volatile memory unit, and copy the one or more sections of the plurality of ranks of the first volatile memory unit to the non-volatile storage unit, wherein one section of the one or more sections is copied to the non-volatile storage unit at a time upon a predetermined amount of time expiring.

In another embodiment, a storage device comprises a non-volatile storage unit, wherein a capacity of the non-volatile storage unit is divided into a plurality of zones, and wherein the non-volatile storage unit comprises a plurality of dies. Each of the plurality of dies comprising a plurality of erase blocks. The storage device further comprising a first volatile memory unit comprising a plurality of ranks, wherein the plurality of ranks are divided into one or more sections. The storage device comprising a controller coupled to the non-volatile storage unit and the first volatile memory unit. The controller comprising a second volatile memory unit. The controller is configured to receive one or more write commands to write data to one or more zones of the plurality of zones, update delta data associated with at least one zone of the one or more zones for each of the one or more write commands received in the second volatile memory unit, wherein delta data is updated for a particular zone each time a command is received to write data to the particular zone, copy the delta data associated with the at least one zone from the second volatile memory unit to the plurality of ranks of the first volatile memory unit, determine when a majority of the ranks within each section of the one or more sections have been updated or written to, and copy at least one section of the one or more sections to the non-volatile storage unit when the determination is made that the majority of the ranks within the at least one section have been updated or written to.

