Method for writing data of an atomic transaction to a memory device
AssigneeSanDisk Technologies LLC
InventorsAndrew Tomlin, Sergey A. Gorobets, Reuven Elhamias, Shai Traister, Alan D. Bennett
Life of this patent
Estimating the term…
Abstract
A method for writing data to a memory device is disclosed. In one embodiment, data of an atomic transaction is written to a first memory in a memory device. A determination is made regarding whether all of the data of the atomic transaction was written to the first memory. The data of the atomic transaction is read from the first memory and written to a second memory in the memory device only if it is determined that all of the data of the atomic transaction was written to the first memory.
Claims22
A method for writing data of an atomic transaction to a memory device, the method comprising:
- (a) determining that the memory device is in a secure session and in response:
- (a1) determining whether a designated area in a first memory of the memory device for the secure session is full, wherein the designated area of the first memory is a reserved memory area used only for writing data of an atomic transaction;
- (a2) when the designated area is not full, writing the data of the atomic transaction to the first memory in the memory device, but otherwise returning an error status and refraining from writing the data of the atomic transaction to the first memory;
- (b) determining whether all of the data of the atomic transaction was written to the first memory;
- (c) only when it is determined that all of the data of the atomic transaction was written to the first memory:
- (c1) reading the data of the atomic transaction from the first memory;
- and
- (c2) writing the data of the atomic transaction read from the first memory to a second memory in the memory device;
- (c3) after a power loss, determining whether all of the data of the atomic transaction read from the first memory was written to the second memory;
- and
- (c4) when all of the data of the atomic transaction read from the first memory was not written to the second memory, repeating (c1) and (c2);
- and
- (d) when all of the data of the atomic transaction was not written to the first memory, discarding any data written to the first memory;
- wherein the first and second memories are non-volatile memories.
A method for writing data of an atomic transaction to a memory device, the method comprising:
- (a) determining that a memory device is in a secure session and in response:
- (a1) determining whether a designated area in a first memory of the memory device for the secure session is full, wherein the designated area of the first memory is a reserved memory area used only for writing data of an atomic transaction;
- (a2) when the designated area is not full, writing the data of the atomic transaction to the first memory in the memory device, but otherwise returning an error status and refraining from writing the data of the atomic transaction to the first memory;
- wherein the first memory is outside of a logical block address (LBA) space of a second memory in the memory device, and wherein the first memory is smaller than the second memory;
- (b) determining whether a write-abort occurred during the writing of the data of the atomic transaction to the first memory;
- (c) when it is determined that a write-abort did not occur:
- (c1) reading the data of the atomic transaction from the first memory;
- and
- (c2) writing the data of the atomic transaction read from the first memory to a second memory in the memory device;
- (c3) after a power loss, determining whether all of the data of the atomic transaction read from the first memory was written to the second memory;
- and
- (c4) when all of the data of the atomic transaction read from the first memory was not written to the second memory, repeating (c1) and (c2);
- and
- (d) when it is determined that a write-abort occurred, discarding any data written to the first memory;
- wherein the first and second memories are non-volatile memories.
A memory device comprising:
- a first memory;
- a second memory;
- and
- circuitry operative to:
- (a) determine that the memory device is in a secure session and in response:
- (a1) determine whether a designated area in the first memory for the secure session is full, wherein the designated area of the first memory is a reserved memory area used only for writing data of an atomic transaction;
- (a2) when the designated area is not full, write the data of the atomic transaction to the first memory, but otherwise return an error status and refrain from writing the data of the atomic transaction to the first memory;
- (b) determine whether all of the data of the atomic transaction was written to the first memory;
- (c) only when it is determined that all of the data of the atomic transaction was written to the first memory:
- (c1) read the data of the atomic transaction from the first memory;
- (c2) write the data of the atomic transaction read from the first memory to the second memory;
- (c3) after a power loss, determine whether all of the data of the atomic transaction read from the first memory was written to the second memory;
- and
- (c4) when all of the data of the atomic transaction read from the first memory was not written to the second memory, repeat (c1) and (c2);
- and
- (d) when all of the data of the atomic transaction was not written to the first memory, discard any data written to the first memory;
- wherein the first and second memories are non-volatile memories.
A memory device comprising:
- a first memory;
- a second memory, wherein the first memory is outside of a logical block address (LBA) space of the second memory, and wherein the second memory is larger than the first memory;
- and
- circuitry operative to:
- (a) determine that a memory device is in a secure session and in response:
- (a1) determine whether a designated area in the first memory for the secure session is full, wherein the designated area of the first memory is a reserved memory area used only for writing data of an atomic transaction;
- (a2) when the designated area is not full, write the data of the atomic transaction to the first memory in the memory device, but otherwise return an error status and refrain from writing data of the atomic transaction to the first memory;
- wherein the first memory is outside of a logical block address (LBA) space of a second memory in the memory device, and wherein the first memory is smaller than the second memory;
- (b) determine whether a write-abort occurred during the writing of the data of the atomic transaction to the first memory;
- (c) when it is determined that a write-abort did not occur:
- (c1) read the data of the atomic transaction from the first memory;
- and
- (c2) write the data of the atomic transaction read from the first memory to a second memory in the memory device;
- (c3) after a power loss, determine whether all of the data of the atomic transaction read from the first memory was written to the second memory;
- and
- (c4) when all of the data of the atomic transaction read from the first memory was not written to the second memory, repeat (c1) and (c2);
- and
- (d) when it is determined that a write-abort occurred, discard any data written to the first memory;
- wherein the first and second memories are non-volatile memories.
Dependencies are inferred from the claim text.