Bad sector repair method and apparatus
First Claim
Patent Images
1. A bad sector repair method, comprising:
- receiving, by a solid state disk (SSD), a first write operation instruction from a host, the first write operation instruction comprising a logical block address (LBA) of a first sector and data that needs to be written to the first sector;
reading, according to the LBA of the first sector, data of a physical page in which the first sector is located;
allocating, in a cache, storage space with a same size as the physical page, wherein the cache is a volatile memory;
writing preset data from the host into the storage space allocated in the cache in response to when reading the data of the physical page fails, the storage space comprising at least two storage areas, and each of the storage areas corresponding to a sector of the physical page;
updating, according to the LBA of the first sector, preset data that is of a storage area corresponding to the first sector and within the storage space with the data that needs to be written to the first sector; and
writing the updated data in the storage space to a flash memory of the SSD to repair the first sector.
1 Assignment
0 Petitions
Accused Products
Abstract
A bad sector repair method includes receiving a first write operation instruction sent by a host, reading data of a physical page including the first sector according to a logical block address (LBA) of a first sector included in the first write operation instruction, allocating storage space with a same size as the physical page in a cache and setting data in the storage space to preset data when reading the data of the physical page fails, updating preset data of a storage area corresponding to the first sector and in the storage space with data that needs to be written to the first sector, and writing data in the storage space to the physical page to repair the first sector.
11 Citations
15 Claims
-
1. A bad sector repair method, comprising:
-
receiving, by a solid state disk (SSD), a first write operation instruction from a host, the first write operation instruction comprising a logical block address (LBA) of a first sector and data that needs to be written to the first sector; reading, according to the LBA of the first sector, data of a physical page in which the first sector is located; allocating, in a cache, storage space with a same size as the physical page, wherein the cache is a volatile memory; writing preset data from the host into the storage space allocated in the cache in response to when reading the data of the physical page fails, the storage space comprising at least two storage areas, and each of the storage areas corresponding to a sector of the physical page; updating, according to the LBA of the first sector, preset data that is of a storage area corresponding to the first sector and within the storage space with the data that needs to be written to the first sector; and writing the updated data in the storage space to a flash memory of the SSD to repair the first sector. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A bad sector repair apparatus, comprising:
-
a receiver configured to receive a first write operation instruction from a host, the first write operation instruction comprising a logical block address (LBA) of a first sector and data that needs to be written to the first sector; a processor coupled to the receiver and configured to; read, according to the LBA of the first sector that is obtained by the receiver, data of a physical page in which the first sector is located; allocate, in a cache, storage space with a same size as the physical page, wherein the cache is a volatile memory; write preset data from the host into the storage space allocated in the cache in response to when reading the data of the physical page fails, the storage space comprising at least two storage areas, and each of the storage areas corresponding to a sector of the physical page; update, according to the LBA of the first sector obtained by the receiver, preset data that is of a storage area corresponding to the first sector and within the storage space with the data that needs to be written to the first sector; and write the updated data in the storage space to a flash memory of a solid state disk (SSD) to repair the first sector. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A bad sector repair apparatus, comprising:
-
a bus interface configured to receive a first write operation instruction from a host, the first write operation instruction including a logical block address (LBA) of a first sector and data that needs to be written to the first sector; and a processor coupled to the bus interface and configured to; receive the first write operation instruction from the host, the first write operation instruction comprising the LBA of the first sector and data that needs to be written to the first sector; read, according to the LBA of the first sector, data of a physical page in which the first sector is located; allocate, in a cache, storage space with a same size as the physical page, wherein the cache is a volatile memory; write preset data from the host into the storage space allocated in the cache in response to when reading the data of the physical page fails, the storage space comprising at least two storage areas, and each of the storage areas corresponding to a sector of the physical page; update, according to the LBA of the first sector, preset data that is of the storage area corresponding to the first sector and within the storage space with the data that needs to be written to the first sector; and write the updated data in the storage space to a flash memory of a solid state disk (SSD) to repair the first sector. - View Dependent Claims (12, 13, 14, 15)
-
Specification