Data storage device and method for host-initiated transactional handling for large data set atomicity across multiple memory commands
A data storage device and method for host-initiated transactional handling for large data set atomicity across multiple memory commands are provided. In one embodiment, a data storage device is provided comprising a memory and a controller. The controller is configured to commence performance of a plurality of atomic operations; and prior to successful completion of the plurality of atomic operations: determine an available capacity of the memory, wherein memory locations storing data written by the plurality of atomic operations are considered unavailable even though the data is not yet committed to the memory locations; and inform the host of the determined available capacity of the memory. Other embodiments are possible, and each of the embodiments can be used alone or together in combination.
1. A data storage device comprising:
a memory; and
a controller configured to:
in response to receiving, from a host, a request to perform a plurality of atomic operations, commence performance of the plurality of atomic operations by:
storing data in physical addresses in the memory; and
including partial commit references in entries in a logical-to-physical address map for the physical addresses;
in response to receiving, from the host, a request for an available capacity of the memory prior to successful completion of the plurality of atomic operations:
determine an available capacity of the memory, wherein the physical addresses associated with the entries in the logical-to-physical address map that include the partial commit references are considered unavailable even though the data is not yet committed to the physical addresses; and
inform the host of the determined available capacity of the memory;
in response to receiving, from the host, a request to perform other, non-atomic operations in the memory, perform the other, non-atomic operations in the memory in parallel with the plurality of atomic operations wherein the other, non-atomic operations are selected by the host so as to not exceed the determined available capacity of the memory; and
in response to determining that an atomic operation of the plurality of atomic operations failed or was aborted by the host:
delete the partial commit reference in the entry in the logical-to-physical address map for the physical address associated with the atomic operation; and
determine an updated available capacity of the memory, wherein the physical address associated with the atomic operation is considered available after the partial commit reference in the entry in the logical-to-physical address map for the physical address is deleted.
2. The data storage device of claim 1 , wherein the controller is further configured to:
in response to receiving, from the host, a command to read a memory location associated with one of the entries in the logical-to-physical address map that includes the partial commit reference:
return default dummy data.
3. The data storage device of claim 1 , wherein the controller is further configured to maintain states of the plurality of atomic operations.
4. The data storage device of claim 1 , wherein the controller is further configured to perform the plurality of atomic operations in parallel with the host performing a power cycle.
5. The data storage device of claim 1 , wherein the controller is further configured to commit the data to the physical addresses after successful completion of the plurality of atomic operations.
6. The data storage device of claim 1 , wherein the controller is further configured to delete a reference to the data after unsuccessful completion of the plurality of atomic operations.
7. The data storage device of claim 1 , wherein the controller is further configured to delete the data after unsuccessful completion of the plurality of atomic operations.
8. The data storage device of claim 1 , wherein the data is stored across multiple blocks in the memory.
9. The data storage device of claim 1 , wherein the memory comprises a three-dimensional memory.
10. A method comprising:
performing the following in a data storage device comprising a memory:
in response to receiving, from a host, a request to perform a plurality of atomic operations, commencing performance of the plurality of atomic operations by:
storing data in physical addresses in the memory; and
including partial commit references in entries in a logical-to-physical address map for the physical addresses;
in response to receiving, from the host, a request for an available capacity of the memory prior to successful completion of the plurality of atomic operations:
determining an available capacity of the memory, wherein the physical addresses associated with the entries in the logical-to-physical address map that include the partial commit references are considered unavailable even though the data is not yet committed to the physical addresses; and
informing the host of the determined available capacity of the memory;
in response to receiving, from the host, a request to perform other, non-atomic operations in the memory, performing the other, non-atomic operations in the memory in parallel with the plurality of atomic operations, wherein the other, non-atomic operations are selected by the host so as to not exceed the determined available capacity of the memory; and
in response to determining that an atomic operation of the plurality of atomic operations failed or was aborted by the host:
deleting the partial commit reference in the entry in the logical-to-physical address map for the physical address associated with the atomic operation; and
determining an updated available capacity of the memory, wherein the physical address associated with the atomic operation is considered available after the partial commit reference in the entry in the logical-to-physical address map for the physical address is deleted.
11. The method of claim 10 , further comprising:
in response to receiving, from the host, a command to read a memory location associated with one of the entries in the logical-to-physical address map that includes the partial commit reference:
returning default dummy data.
12. The method of claim 10 , further comprising responding to a request from the host for a status check of the plurality of atomic operations.
13. The method of claim 10 , further comprising removing the partial commit references after successful completion of the plurality of atomic operations.
14. The method of claim 10 , further comprising maintaining states of the plurality of atomic operations.
15. The method of claim 10 , further comprising performing a part of the plurality of atomic operations during a host power cycle.
16. The method of claim 10 , further comprising rolling back the data written from the plurality of atomic operations in response to an unsuccessful completion of the atomic plurality of atomic operations.
17. The method of claim 10 , wherein the data is stored across multiple blocks in the memory.
18. A data storage device comprising:
a memory;
means for, in response to receiving a request from a host to perform a plurality of atomic operations, commencing performance of the plurality of atomic operations by:
storing data in physical addresses in the memory; and
including partial commit references in entries in a logical-to-physical address map for the physical addresses;
means for, in response to receiving a request from the host for an available capacity of the memory prior to successful completion of the plurality of atomic operations:
determining an available capacity of the memory, wherein the physical addresses associated with the entries in the logical-to-physical address map that include the partial commit references are considered unavailable even though the data is not yet committed to the physical addresses; and
informing the host of the determined available capacity of the memory;
means for performing other, non-atomic operations requested by the host in the memory in parallel with the plurality of atomic operations, wherein the other, non-atomic operations are selected by the host so as to not exceed the determined available capacity of the memory; and
means for, in response to determining that an atomic operation of the plurality of atomic operations failed or was aborted by the host:
deleting the partial commit reference in the entry in the logical-to-physical address map for the physical address associated with the atomic operation; and
determining an updated available capacity of the memory, wherein the physical address associated with the atomic operation is considered available after the partial commit reference in the entry in the logical-to-physical address map for the physical address is deleted.
19. The data storage device of claim 1 , wherein the controller is further configured to respond to a request from the host for a status check of the plurality of atomic operations.
20. The method of claim 10 , wherein the memory comprises a three-dimensional memory.