Data Writing Method and Data Storage Device
First Claim
1. A data writing method for a memory, wherein the memory comprises a data area and a spare area, the data area comprises a plurality of data blocks storing data, and the spare area comprises a plurality of spare blocks having no data stored therein, comprising:
- receiving a write command for writing a write data to a first data block of the flash memory from a host;
selecting a first spare block with the earliest erase time index in comparison with those of other spare blocks from the spare area;
determining whether an erase count of the first spare block is less than a first threshold;
when the erase count of the first spare block is less than the first threshold, writing the write data to the first spare block; and
erasing data from the first data block to convert the first data block to a spare block.
1 Assignment
0 Petitions
Accused Products
Abstract
The invention provides a data writing method for a memory. In one embodiment, the memory comprises a data area and a spare area, the data area comprises a plurality of data blocks storing data, and the spare area comprises a plurality of spare blocks having no data stored therein. First, a write command for writing a write data to a first data block of the flash memory is received from a host. A first spare block with the earliest erase time index is then selected from the spare area. Whether an erase count of the first spare block is less than a first threshold is then determined When the erase count of the first spare block is less than the first threshold, the write data is written to the first spare block. Data is then erased from the first data block to convert the first data block to a spare block.
16 Citations
13 Claims
-
1. A data writing method for a memory, wherein the memory comprises a data area and a spare area, the data area comprises a plurality of data blocks storing data, and the spare area comprises a plurality of spare blocks having no data stored therein, comprising:
-
receiving a write command for writing a write data to a first data block of the flash memory from a host; selecting a first spare block with the earliest erase time index in comparison with those of other spare blocks from the spare area; determining whether an erase count of the first spare block is less than a first threshold; when the erase count of the first spare block is less than the first threshold, writing the write data to the first spare block; and erasing data from the first data block to convert the first data block to a spare block. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A data storage device, comprising:
-
a memory, comprising a data area and a spare area, wherein the data area comprises a plurality of data blocks storing data, and the spare area comprises a plurality of spare blocks having no data stored therein; and a controller, receiving a write command for writing a write data to a first data block of the flash memory from a host, selecting a first spare block with the earliest erase time index from the spare area, determining whether an erase count of the first spare block is less than a first threshold, and when the erase count of the first spare block is less than the first threshold, writing the write data to the first spare block, and erasing data from the first data block to convert the first data block to a spare block. - View Dependent Claims (9, 10, 11, 12, 13)
-
Specification