Method for performing copy back operations and flash storage device
First Claim
1. A method for performing copy back operations, comprising:
- sending a copy back command to a flash memory for reading a first error correction code (ECC) data from a first address;
receiving the first error correction code from the flash memory;
decoding the first ECC data without performing error correction to calculate a fail count of the first ECC data;
comparing the fail count with a first threshold value, wherein when the fail count is less than the first threshold value, a first program command is sent to the flash memory for storing the first ECC data to a second address of the flash memory;
comparing the fail count with a second threshold value;
performing partial error correction when the fail count is greater than the first threshold value and less than the second threshold value,correcting at least one error segment of the first ECC data to obtain at least one corrected data segment;
encoding a partial parity according to the corrected data segment;
sending the corrected data segment and the partial parity to the flash memory; and
after the flash memory amends the first ECC data according to the corrected data segment and the partial parity to obtain a second ECC data, sending a second program command to the flash memory for storing the second ECC data to the second address of the flash memory.
1 Assignment
0 Petitions
Accused Products
Abstract
The invention provides a method for performing copy back operations. First, a copy back command is sent to a flash memory for reading a first error correction code (ECC) data from a first address. The first ECC data is then received from the flash memory. The first ECC data is then decoded without performing error correction to calculate a fail count of the first ECC data. The fail count is then compared with a first threshold value. When the fail count is less than the first threshold value, a first program command is sent to the flash memory for storing the first ECC data to a second address of the flash memory. When the fail count is less than the first threshold value, the first ECC data is not sent back to the flash memory.
15 Citations
17 Claims
-
1. A method for performing copy back operations, comprising:
-
sending a copy back command to a flash memory for reading a first error correction code (ECC) data from a first address; receiving the first error correction code from the flash memory; decoding the first ECC data without performing error correction to calculate a fail count of the first ECC data; comparing the fail count with a first threshold value, wherein when the fail count is less than the first threshold value, a first program command is sent to the flash memory for storing the first ECC data to a second address of the flash memory; comparing the fail count with a second threshold value; performing partial error correction when the fail count is greater than the first threshold value and less than the second threshold value, correcting at least one error segment of the first ECC data to obtain at least one corrected data segment; encoding a partial parity according to the corrected data segment; sending the corrected data segment and the partial parity to the flash memory; and after the flash memory amends the first ECC data according to the corrected data segment and the partial parity to obtain a second ECC data, sending a second program command to the flash memory for storing the second ECC data to the second address of the flash memory. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A flash storage device, comprising:
-
a flash memory, storing a first error correction code (ECC) data at a first address; and a controller, sending a copy back command to the flash memory for reading the first ECC data, receiving the first ECC data from the flash memory, decoding the first ECC data without performing error correction to calculate a fail count of the first ECC data, comparing the fail count with a first threshold value; wherein when the fail count is less than the first threshold value, a first program command is sent to the flash memory for storing the first ECC data to a second address;
wherein when the fail count is greater than the first threshold value and less than a second threshold value, the controller performs error correction, corrects errors of source data of the first ECC data to obtain corrected source data, encodes a parity according to the corrected source data, combines the corrected source data with the parity to obtain a second ECC data, sends the second ECC data to the flash memory, and sends a second program command to the flash memory for storing the second ECC data to the second address of the flash memory. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A method for performing copy back operations, comprising:
-
sending a 2-plane copy back command to a first flash memory and a second flash memory for reading a first error correction code (ECC) data and for reading a second ECC data; receiving the first ECC data from the first flash memory; receiving the second ECC data from the second flash memory; decoding the first ECC data without performing error correction to calculate a first fail count of the first ECC data; when the first fail count is less than a first threshold value, sending a first program command to the first flash memory for storing the first ECC data to the flash memory; decoding the second ECC data to calculate a second fail count of the second ECC data; when the second fail count is less than the first threshold value, sending a second program command to the second flash memory for storing the second ECC data to the second flash memory, wherein the first ECC data is not sent back to the first flash memory when the first fail count is less than the first threshold value, and the second ECC data is not sent back to the second flash memory when the second fail count is less than the first threshold value; when the first fail count is greater than the first threshold value, comparing the fail count with a second threshold value, wherein the second threshold value is greater than the first threshold value; when the first fail count is less than the second threshold value, performing partial error correction; correcting at least one first error segment of the first ECC data to obtain at least one first corrected data segment; encoding a first partial parity according to the first corrected data segment; sending the first corrected data segment and the first partial parity to the first flash memory; and after the first flash memory amends the first ECC data according to the first corrected data segment and the first partial parity to obtain a third ECC data, sending a third program command to the first flash memory for storing the third ECC data to the first flash memory. - View Dependent Claims (14, 15, 16, 17)
-
Specification