WO2020077489A1 - Procédé de traitement de bloc de stockage, et dispositif associé - Google Patents

Procédé de traitement de bloc de stockage, et dispositif associé Download PDF

Info

Publication number
WO2020077489A1
WO2020077489A1 PCT/CN2018/110223 CN2018110223W WO2020077489A1 WO 2020077489 A1 WO2020077489 A1 WO 2020077489A1 CN 2018110223 W CN2018110223 W CN 2018110223W WO 2020077489 A1 WO2020077489 A1 WO 2020077489A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
bad
target
storage
bad page
Prior art date
Application number
PCT/CN2018/110223
Other languages
English (en)
Chinese (zh)
Inventor
贾学超
褚艳旭
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/110223 priority Critical patent/WO2020077489A1/fr
Priority to CN201880098515.6A priority patent/CN112805686B/zh
Publication of WO2020077489A1 publication Critical patent/WO2020077489A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of data storage, in particular to a storage block processing method and related equipment.
  • a solid state drive is a type of storage device, which uses a flash memory (nand flash, NAND) as the main storage medium.
  • NAND flash memory
  • the smallest operation unit for reading and writing data from a solid state drive is a page, which is erased
  • the smallest operating unit of data is a block.
  • each storage block is composed of hundreds to thousands of pages in succession.
  • RBER raw bit error rate
  • ECC error correction code
  • SSD When the above problem occurs on some pages of NAND, SSD will mark the block where the problem page is located as a bad block, no longer participate in the read and write operation, and reduce the leakage current by increasing the threshold voltage of a part of the transistors in the bad block, thereby reducing The impact of bad blocks on the remaining blocks, thereby ensuring data integrity. Because the SSD reserves redundant blocks, the data space visible to the user is not reduced due to bad blocks, so the SSD can continue to be used. However, due to the limited number of SSD redundant blocks, when the bad blocks reach a certain number, the SSD reaches the end of life.
  • An embodiment of the present application provides a storage block processing method and related equipment.
  • the present application obtains a continuous maximum storage interval that does not include the bad page in the storage block, and continues to use the continuous maximum storage interval In order to avoid directly marking the entire storage block as a bad block, slow down the consumption of redundant blocks and prolong the service life of the storage device.
  • a first aspect of an embodiment of the present application provides a storage block processing method that is applied to a controller, where the controller is applied to a storage device, and the storage device includes the controller and a memory, and the memory includes multiple Memory blocks, the memory block contains multiple pages, and the controller includes storage interval information of each memory block, and the storage interval information is used to indicate an available storage interval of the memory block.
  • the method may include: when the controller detects that there is at least one bad page in the target storage block, acquiring at least one bad page position corresponding to the at least one bad page one by one, the at least one bad page position including the at least one bad page position At least one bad page number corresponding to each bad page, the at least one bad page number is used to indicate the sort position of the at least one bad page among the multiple pages included in the target storage block, wherein, when the at least one bad page is In the case of a bad page, the at least one bad page position is the bad page number of the one bad page. When there are at least two bad pages in the at least one bad page, the at least one bad page position includes the at least two bad pages.
  • the controller may divide the available storage interval of the target memory block according to the at least one bad page number to determine a good area, wherein the good area is the target storage The maximum storage interval of the block that is continuous and free of the bad page in the available storage interval of the block; the controller can be based on the second start page number of the start page of the good area and the second end of the end page Number, update the storage section information of the target storage block, wherein the storage section information of the target storage block includes the first start page number of the start page of the available storage section of the target storage block and the first end page number of the end page , The updated storage interval information of the target storage block indicates that the available storage interval of the target storage block is the good area, so that the controller can store subsequently received user data into the good area.
  • the available storage interval of the target storage block of the storage block may be divided according to the position of the bad page, so that the available storage interval of the target storage block does not include the bad page
  • the maximum continuous interval is determined as a good area, and then the available storage interval of the storage block is updated according to the good area, which avoids directly marking the entire storage block as a bad block, slows down the consumption of redundant blocks, and extends the use of solid state drives Longevity, and because the consumption of redundant blocks is reduced, the increase of the write amplification factor is also avoided, which further extends the service life of the solid-state hard disk; in addition, this application can also be applied to other storage devices containing storage blocks, thereby extending storage The service life of the equipment.
  • the at least one bad page is a bad page
  • the controller obtains the bad page position of the one bad page, that is, the bad page number of the one bad page, the bad page
  • the bad page number as the number of the separator page divides the available storage interval of the target memory block to determine the good area, that is, the second start page number of the start page of the good area or the end page of the good area The second end page number.
  • the controller may directly use the position of the one bad page as the position of the separation page to divide the available storage interval of the target storage block, thereby determining the good area and increasing The operability of this program.
  • the bad page position of the one bad page includes the bad page number of the one bad page
  • the storage interval information of the target storage block includes the first starting page of the start page of the available storage interval of the target storage block Start page number, the bad page number of the one bad page and the first start page number are used to determine the multiple pages contained in the target memory block by the start page of the one bad page and the available storage interval of the target memory block
  • the sorting position in the controller the controller can obtain the availability of the target storage block if the sorting position of the one bad page is in the first half of the available storage interval of the target storage block according to the bad page number of the one bad page
  • the number of the next page of the one bad page in the storage interval to determine that the multiple pages contained in the next page of the one bad page to the end page of the available storage interval of the target memory block are the good areas; the controller can The first starting page number in the storage interval information of the target storage block is updated to the number of the next page of the one bad page, so that the available storage interval of the target
  • the controller may number the multiple pages included in the target storage block, so that when the at least one bad page is a bad page, it can determine whether the one bad page is located according to the bad page number of the one bad page.
  • the first half of the available storage interval of the target memory block when it is determined to be in the first half, the first start page number can be updated to the number of the next page of the one bad page, thus completing the storage of the target memory block
  • the update operation of the interval information avoids the operation of counting the number of pages located before and after the one bad page in the available storage interval of the target storage block page by page after detecting a bad page, and improves the target storage block
  • the update efficiency of the storage interval information avoids the operation of counting the number of pages located before and after the one bad page in the available storage interval of the target storage block page by page after detecting a bad page, and improves the target storage block The update efficiency of the storage interval information.
  • the bad page position of the one bad page includes the bad page number of the one bad page
  • the storage interval information of the target storage block includes the first termination of the end page of the available storage interval of the target storage block Page number, the bad page number of the one bad page and the first end page number are used to determine the end page of the one bad page and the available storage interval of the target memory block among the multiple pages included in the target memory block Sorting position;
  • the controller can obtain the available storage of the target storage block when determining the sorting position of the one bad page in the second half of the available storage interval of the target storage block according to the bad page number of the one bad page The number of the previous page of the one bad page in the interval to determine the number of pages contained in the start page of the available storage interval of the target memory block to the previous page of the one bad page as the good area; the controller can The first termination page number is updated to the number of the previous page of the one bad page, so that the available storage interval of the target storage block is updated to the good area.
  • the controller may number the multiple pages included in the target storage block, so that when the at least one bad page is a bad page, it can determine whether the one bad page is located according to the bad page number of the one bad page.
  • the second half of the available storage interval of the target memory block when it is determined to be in the first half, the first end page number can be updated to the number of the previous page of the one bad page, thus completing the target memory block
  • the update operation of the storage interval information of the computer avoids the operation of counting the number of pages located before and after the one bad page in the available storage interval of the target storage block after detecting a bad page, which improves the target Update efficiency of storage block information in the storage block.
  • the controller determines the target bad page according to the target bad page position
  • the available storage interval of the target storage block is divided by using the target bad page position as the position of the separation page to determine a good area.
  • the controller when there are at least two bad pages in the at least one bad page, since the controller processes the at least two bad pages page by page, the post-processed bad pages may appear in the available storage interval of the target storage block
  • the controller only divides the available storage interval of the target storage block according to the target bad page location when the target bad page is located in the available storage interval of the target storage block, so that when the bad page occurs in When the unavailable storage interval of the target storage block does not affect the available storage interval of the target storage block, the operation of re-dividing the available storage interval is no longer performed, which avoids the waste of processing resources of the controller and reduces the storage block Management complexity.
  • the at least two bad pages in the at least one bad page there are at least two bad pages in the at least one bad page, and at least two bad page positions in one-to-one correspondence with the at least two bad pages in the at least one bad page position
  • the at least two Each bad page position contains at least two bad page numbers corresponding to at least two bad pages, and the at least two bad page numbers are used to determine that the at least two bad pages are among the multiple pages included in the target storage block
  • the sorting position of the controller may determine the edge bad page according to the at least two bad page numbers, and the edge bad page is the bad page with the sorting position at the top or the sorting position at the bottom of the at least two bad pages, where , In the case that it is determined according to the at least two bad page numbers that the sort positions of the at least two bad pages are all in the first half of the available storage interval of the target storage block, it can be obtained that the sort positions of the at least two bad pages are located in the most The bad page position of the next bad page is used as the edge bad page
  • the controller may acquire the edge bad pages in the at least two bad pages, so that only the available storage of the target storage block according to the edge bad pages The interval is divided to avoid repeated operations when processing the at least two bad pages page by page, thereby improving the efficiency of processing the bad pages.
  • the controller may also set an isolation area in the good area to divide the good area into an isolation area and a user data area, where the isolation area contains at least one page of random data and is located in Between the at least one bad page and the user data area, the user data area is used to store valid data, wherein, when the at least one bad page is a bad page, the isolation area is at least adjacent to the one bad page One page; when there are at least two bad pages in the at least one bad page, the isolation area is at least one page adjacent to the edge page in the at least two bad pages.
  • this program interference may further increase.
  • the bad page is in the first half of the available storage interval of the target memory block, the The top-ranked page in the good area is used as the starting page, and at least one page of random data is written, so that an isolation area is set between the bad page and the user data area, which can block the impact of the bad page on the available pages, thereby Improve the reliability of available storage areas.
  • the at least one bad page location includes at least one bad page number corresponding to the at least one bad page one by one, and the at least one bad page number is used to determine that the bad page is included in the target storage block
  • the sorting position in the plurality of pages when it is determined that the sorting position of the at least one bad page is in the first half of the available storage interval of the target memory block according to the at least one bad page number, the controller may sort in the good area
  • the page at the top is used as the starting position, and random data of the at least one page is written to form the isolation area.
  • the controller after the controller performs the erase operation on the good area, it can trigger the operation of setting the isolation area when the target memory block receives valid data; it can also set the timing after performing the erase operation on the good area After the time set by the timer is reached, the operation of setting the isolation zone is triggered.
  • the random data refers to invalid data randomly generated by the controller.
  • the controller when the at least one bad page is located in the first half of the available storage interval of the target storage block, the controller writes the at least one page with the sorted position in the good area at the top as the starting position.
  • One page of random data, thus forming the isolated area improves the operability of this solution.
  • the top-ranked page in the good area is the next page of the bad page in the available storage interval of the target storage block;
  • the topmost page in the good area is the next page of the target bad page in the available storage interval of the target storage block, and the target bad page is Any one of the at least two bad pages.
  • the isolation area can be set by the scheme in this application, thereby improving the flexibility and operability of the scheme.
  • the at least one bad page location includes at least one bad page number corresponding to the at least one bad page one by one, and the at least one bad page number is used to determine that the bad page is included in the target storage block
  • the controller will be effective when determining that the sorting position of the at least one bad page is in the second half of the available storage interval of the target memory block according to the at least one bad page number
  • the at least one bad page is in the second half of the available storage interval of the target storage block, if the written valid data has already occupied the user data area, the next page of the user data area As the starting position, the random data of the at least one page is written, thereby forming the isolation area, which improves the operability of the solution.
  • the controller may determine the third termination page number of the termination page of the user data area according to the second termination page number of the termination page of the good area and the preset number of pages in the isolation area, and After performing the write operation in the target memory block twice, obtain the number of the last page of the page where valid data has been written, and determine whether the valid data written by determining whether the number of the last page reaches the third end page number User data area has been occupied.
  • the storage interval information of the target storage block includes the first start page number of the start page of the available storage interval of the target storage block, and there are multiple pages in the good area Start page, the second start page number and the first start page number of the start page of the good area are used to determine the start page of the good area and the start page of the available storage interval of the target memory block in The sorting position among the multiple pages included in the target storage block, and the controller may obtain the first pre-order when determining that the start page of the good area exists in the first preset interval according to the second start page number Set a number, where the first preset interval contains multiple pages, the first preset number is the number of the next page of the first preset interval; after the controller determines the first preset number, The first starting page number may be updated to the first preset number.
  • the number of the start page of the storage interval information of the target storage block is updated to correspond to the first preset interval
  • the first preset number that is, the starting position of the available storage interval of the target storage block is limited to a specific value, because the location of the bad page has a specific rule, you can set the start of the available storage interval according to statistical rules
  • the numbered preset value set so that the edges of the available storage interval are aligned, thereby reducing the management complexity of the storage block.
  • the storage interval information of the target storage block includes the first end page number of the end page of the available storage interval of the target storage block, and the multiple areas included in the good area have the end of the good area Page, the second end page number and the first end page number of the end page of the good area are used to determine the end page of the good area and the end page of the available storage interval of the target storage block included in the target storage block
  • the sorting position in the multiple pages the controller can obtain the second preset number if it is determined that the end page of the good area exists in the second preset interval according to the second end page number, wherein the second The preset interval includes multiple pages, and the second preset number is the number of the previous page in the second preset interval; after the controller determines the second preset number, the first end page number can be Update to the second preset number.
  • the first start page number is updated to the second preset number corresponding to the second preset interval, which is
  • the end position of the available storage interval of the target storage block is limited to a specific value. Since the location of the bad page has a specific law, the preset value set of the end number of the available storage interval can be set according to the statistical law to make it available The edges of the storage interval are aligned, thereby reducing the management complexity of the storage block.
  • the storage interval information of the target storage block includes the first start page number of the start page and the first end page number of the end page of the available storage interval of the target storage block, and the controller can obtain The difference between the first start page number and the first end page number; when the difference reaches or falls below a preset threshold, the target memory block is marked as an unusable memory block.
  • the storage block where the available storage interval is located is marked as a bad block, so that the storage block is no longer managed, thereby reducing the complexity of the management of the storage block by the controller degree.
  • an embodiment of the present application provides a controller that is applied to a storage device and the controller is applied to a storage device.
  • the storage device includes the controller and a memory, and the memory includes multiple storage blocks.
  • the storage block contains multiple pages.
  • the controller contains storage interval information for each storage block.
  • the storage interval information is used to determine the available storage interval of the storage block.
  • the controller includes an acquisition unit, a determination unit, and an update unit: the acquisition The unit is configured to, when it is detected that at least one bad page exists in the target storage block, acquire the position of the at least one bad page corresponding to the at least one bad page, where the at least one bad page is a bad page In the case of pages, the at least one bad page position is the bad page number of the one bad page.
  • the at least one bad page position contains A corresponding at least two bad page numbers; the determining unit is used to determine a good area according to the bad page number of the at least one bad page, wherein the good area is the target storage block The maximum storage interval in the available storage interval of the continuous and without the bad page; the update unit is used to update the second page number of the start page of the good area and the second page number of the end page
  • the storage interval information of the target storage block wherein the storage interval information of the target storage block includes the first start page number and the first end page number of the start page of the available storage interval of the target storage block
  • the storage interval information of the target storage block indicates that the available storage interval of the target storage block is the good area, so that the controller can store subsequently received user data into the good area.
  • the available storage interval of the target storage block of the storage block may be divided according to the location of the bad page, so that the determination unit does not include the available storage interval of the target storage block
  • the maximum continuous interval of bad pages is determined as a good area, and the update unit updates the available storage interval of the storage block according to the good area, avoiding directly marking the entire storage block as a bad block, slowing down the consumption of redundant blocks, and extending
  • the service life of the solid state hard disk is reduced, and because the consumption of redundant blocks is reduced, the increase in the write amplification factor is also avoided, and the service life of the solid state hard disk is further extended; in addition, the application can also be applied to other storage devices that include storage blocks , Thereby extending the life of storage devices.
  • an embodiment of the present application provides a storage device, the storage device includes a controller and a memory, the memory includes a storage block, and the storage block includes a plurality of pages; wherein, the controller is used to execute the first
  • the aspect of the storage block processing method is also used to generate instructions; the memory is used to store data according to the instructions.
  • an embodiment of the present application provides a terminal.
  • the terminal includes an interface, a processor, and a storage device.
  • the storage device includes a controller and a memory.
  • the memory includes a storage block.
  • the storage block includes multiple pages.
  • the controller sends data to the controller through the interface; the controller is used to perform the method of processing memory blocks as described in the first aspect, and is also used to receive the data sent by the processor through the interface and generate instructions; the memory Used to store the data according to the instruction.
  • an embodiment of the present application provides a computer program product containing instructions, which, when the computer program product runs on a computer, causes the computer to execute the method for processing a storage block as described in the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium, in which a message processing instruction is stored, and when it is run on a computer, the computer is allowed to execute the above-described first aspect.
  • Storage block processing method in which a message processing instruction is stored, and when it is run on a computer, the computer is allowed to execute the above-described first aspect.
  • an embodiment of the present application provides a chip system including a processor for supporting a network device to implement the functions involved in the above aspects, for example, for example, sending or processing data and data involved in the above method / Or information.
  • the chip system further includes a memory for storing necessary program instructions and data of the network device.
  • the chip system may be composed of chips, and may also include chips and other discrete devices.
  • FIG. 1a is a schematic structural diagram of a storage device provided by an embodiment of this application.
  • FIG. 1b is another schematic structural diagram of a storage device provided by an embodiment of this application.
  • 1c is a schematic structural diagram of a memory provided by an embodiment of this application.
  • FIG. 2 is a schematic flowchart of a storage block processing method provided by an embodiment of the present application.
  • 3a is a schematic structural diagram of a target storage block provided by an embodiment of this application.
  • 3b is another schematic structural diagram of a target storage block provided by an embodiment of this application.
  • FIG. 4 is another schematic flowchart of a storage block processing method provided by an embodiment of the present application.
  • 5a is another schematic structural diagram of a target storage block provided by an embodiment of this application.
  • 5b is another schematic structural diagram of a target storage block provided by an embodiment of the present application.
  • FIG. 6 is another schematic flowchart of a storage block processing method provided by an embodiment of the present application.
  • FIG. 7 is another schematic flowchart of a storage block processing method provided by an embodiment of the present application.
  • FIG. 8 is another schematic flowchart of a storage block processing method provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a controller provided by an embodiment of the present application.
  • An embodiment of the present application provides a storage block processing method and related equipment.
  • a continuous maximum storage interval that does not include the bad page in the storage block is acquired, and the continuous maximum The storage interval avoids directly marking the entire storage block as a bad block, slows down the consumption of redundant blocks, and extends the service life of the storage device.
  • the present application is applied to a storage device 10 that is connected to a host 20, and the storage device 10 is used to store data according to an instruction of the host 20.
  • the storage device 10 may include a non-embedded storage device, as an example, such as a solid state drive.
  • the storage device 10 may also include an embedded storage device, as an example, such as a stand-alone chip applied to a mobile terminal.
  • the storage device 10 may also be other forms of storage devices, which are not specifically listed here.
  • the storage device 10 may include a controller 100 and a memory 110.
  • the controller 100 communicates with the host 20 and is connected to the memory 110.
  • the controller 100 is used to receive an instruction transmitted by the host and to the memory according to the instruction 110 Perform operations such as erase and write.
  • the controller 100 is also used to manage the storage space in the memory 110.
  • the front end of the controller 100 may include a first interface for communicating with the host 20, and the first interface may be a non-volatile storage high-speed Interface (non-volatile memory express, NVME), serial small computing system interface (serial attached) small computer system interface (SAS), peripheral component extended high-speed interface (peripheral component interconnect interconnect express, PCIE) or other hosts and non-embedded storage devices
  • NVME non-volatile storage high-speed Interface
  • SAS serial attached small computing system interface
  • PCIE peripheral component extended high-speed interface
  • One of the interfaces between the two, the back end of the controller 100 may further include a second interface connected to the memory 110, the second interface may be a flash media interface (nand flash interface, NFI) or other types used inside the memory
  • NFI flash media interface
  • the controller receives commands from the host through the first interface, and performs operations such as erasing and writing on the memory 110 through the second interface according to the received commands.
  • the controller 100 and the memory 110 may be independent chips packaged by the controller circuit and the storage particle array. Therefore, the controller 100 and the memory There may be no interface between 110.
  • the controller 100 communicates with the host 20 through a third interface, which may be a universal flash storage interface (universal flash storage (UFS), an embedded multimedia card interface (embedded multimedia card, EMMC), or other host and embedded One of the interfaces between storage devices, the specific is not limited here.
  • UFS universal flash storage
  • EMMC embedded multimedia card interface
  • the memory 110 may include a flash memory, a random access memory, a read-only memory, or other memory types, etc.
  • the memory 110 may be a storage array composed of storage particles, where the flash memory refers to the flash particles as the storage
  • the memory of the medium is included in the flash memory. It should be understood that, in this embodiment, the flash memory is used as an example for description.
  • the memory 110 may include multiple independent logical units (Die / LUN), and each independent logical unit may include multiple storage planes (Plane), and each storage plane It can contain multiple memory blocks (Block) 1100, and each memory block can contain multiple pages.
  • Die / LUN multiple independent logical units
  • Plane multiple storage planes
  • Block multiple memory blocks
  • each memory block can contain multiple pages.
  • the introduction of the memory 110 here is only for easy understanding. As long as there is a storage block 1100 in the memory 110, the storage block processing method provided in this application can be adopted.
  • the storage interval corresponding to the storage block 1100 is a storage interval that can be independently managed in the controller 100. Since according to different manufacturing processes, one physical block can correspond to a storage interval of the storage block 1100, as an example, for example, There is no layering inside the 32-layer physical block, and the storage interval of the storage block 1100 corresponds to the storage interval formed by the entire physical block. A physical block may also correspond to the storage interval of two or more storage blocks 1100.
  • a 64-layer physical block may be formed by stacking two 32-layer sub-physical blocks, and each physical block contains two
  • the storage interval of one storage block 1100 corresponds to the storage interval formed by the sub-physical block, that is, one physical block corresponds to the storage interval of two storage blocks 1100.
  • An embodiment of the present application provides a storage block processing method.
  • the method is applied to the controller 100, and the storage interval information of each storage block 1100 may be recorded in the controller 100, and the storage interval information is used to indicate the available storage of the storage block.
  • the controller 100 detects a bad page in the target memory block, it can re-divide the good area according to the position of the bad page.
  • the good area is the largest continuous storage area in the available memory interval of the target memory block without bad pages . By dividing the good area, the data can be written to the good area later, making the data safer.
  • the bad page may be one page, or may have at least two pages. Since the bad page is a page and there are at least two pages between the two cases, the corresponding processing method of the controller 100 is different, and the above two cases will be described in detail below.
  • At least one bad page is a page
  • the controller 100 determines that the detected bad page is a page, it is necessary to use the position of the one bad page as the position of the separation page to divide the available storage interval of the target storage block, To determine the good area.
  • the bad page can occur in the first half of the available storage interval of the target storage block, or it can occur in the second half of the available storage interval of the target storage block.
  • the target storage block The available storage interval as a whole, the available storage interval includes a lot of pages arranged in sequence, the page in front of the middle page or two pages is called the first half, and the page in the middle is behind the two pages The page of is called the second half, and the middle page or two pages can belong to the first half or the second half. It should be understood that, in this embodiment and the subsequent embodiments, only the middlemost one also belongs to the first half, the first page of the two pages is the first half, and the next page is the second half. For example, explain. Hereinafter, the above two cases will be described separately.
  • the location of the bad page may be the absolute storage path of the bad page, the relative path of the bad page, or the number of the bad page that has a mapping relationship with the position of the bad page, or For other location information that can indicate bad pages. It should be understood that, in this embodiment and subsequent embodiments, the position of the bad page is taken as the number of the bad page as an example for description.
  • the bad page is in the first half of the available storage interval
  • an embodiment of a processing method of a storage block may include:
  • the controller detects that there is a bad page in the target storage block, the controller obtains the bad page number of the one bad page.
  • the controller 100 may number the multiple pages included in the storage block 1100, and the number of each page is used to indicate the sort position of the page in the multiple pages included in the target storage block, When the controller detects that a bad page appears in a memory block among the multiple memory blocks contained in the memory, the memory block where the bad page appears is the target memory block, and then the controller can obtain the bad page of the bad page Number, the bad page number of the one bad page is used to indicate the sort position of the bad page among the multiple pages included in the target storage block.
  • the number of the bad page may only include the page number in a digital form.
  • the bad page is identified as the 23rd of the multiple pages included in the target storage block.
  • Page; bad page number can also be used to contain both numbers and / or letters and / or other types of information, as an example, for example, the bad page number can be the storage address of the bad page, as another example, the bad page number It can also be part of the information extracted from the storage location of the bad page, such as F0083, indicating that the bad page is on page 83 of the F storage block; the number of the bad page can also be in other forms, and specific examples are not given here. It should be understood that the number of any one of the multiple pages included in the memory block may be in the above-mentioned form.
  • the controller may store a correspondence table between the position of the bad page and the number of the bad page, and after determining the position of the bad page, the controller may determine the number of the bad page according to the correspondence table ; You can also include the bad page number information in the position of the bad page, that is, the controller can obtain the bad page number when determining the position of the bad page; the controller can also obtain the bad page number in other ways , Specific here is not limited. It should be understood that the number of any one of the multiple pages included in the memory block can be obtained in the above manner.
  • the controller obtains the number of the next page of the one bad page in the available storage interval of the target storage block.
  • the controller may obtain the number of the next page of the bad page in the available storage interval of the target storage block, so as to include the multiple of the next page of the bad page to the end page of the available storage interval of the target storage block.
  • the page is determined to be a good area, and the good area is the largest storage area that is continuous among the available storage intervals of the target memory block and does not exist the bad page.
  • the number of the end page of the available storage interval of the target memory block is 0996
  • the number of the one bad page is 0023
  • the number of the next page of the one bad page may be 0024
  • the good area is numbered 0024 to Multiple pages included in the number 0996
  • the end page of the available storage interval of the target memory block is F0996
  • the number of the one bad page is F0083
  • the next page of the one bad page The number can be F0084
  • the good area is the number of pages contained between F0084 and F0996. It should be understood that the examples here are for convenience only, and the value of the number of any page is not limited.
  • the good area is a storage area that does not contain bad pages, after the controller determines the good area, after subsequently receiving valid data, it will only store the valid data in the good area .
  • the controller can record the available storage interval of each storage block by recording the number of the start page and the number of the end page of each storage block.
  • the page number can indicate the sort position of the bad page corresponding to the bad page number among the multiple pages included in the target memory block, then the controller can obtain the number of the start page and the end page of the available storage interval of the target memory block , And then determine whether the one bad page exists in the first half of the available storage interval of the target storage block.
  • Storage block Available storage interval Storage block 0 Start Page Number PageSt, End Page Number PageEd Storage block 1 Start Page Number PageSt, End Page Number PageEd ... ... Storage block N Start Page Number PageSt, End Page Number PageEd
  • the start page number and the end page number of the memory blocks shown in Table 1 and Table 2 may be stored in an array, a linked list, or other data structures.
  • the starting page number of the storage block is the starting page number of the physical block
  • the ending page number of the storage block is The end page number of the physical block, as an example, for example, the storage interval provided by physical block 0 is [0001,1000], then the number of the start page of storage block 0 is 0001, and the number of the end page is 1000;
  • the start page number and end page number of the storage block correspond to the start page number and end page number of the sub-physical block, as an example, for example, physical
  • the storage interval provided by block 1 is [0001,1000]
  • the physical block includes sub-physical block 0 and sub-physical block 1, wherein the storage interval provided by sub
  • the target A bad page occurs in the storage block.
  • the bad page is determined to exist in the target storage
  • the first half of the available storage interval of the block for example, the page number of the starting page of the target storage block is 0008, the page number of the end page is 0996, the page number of the one bad page is 0015, then the page number of a bad page indicates The bad page is in the first half of the available storage interval of the target storage block.
  • start page number, end page number, and bad page number of the available storage interval of the target memory block all contain numbers and / or letters and / or other types of information, you can The number of the start page and the number of the end page determine the number of the middle page.
  • the middle page is one, and if the one bad page does not exceed the middle page, it is determined that the one bad page is located in the first half of the available storage interval of the target storage block ;
  • there are even pages in the available storage interval of the target storage block there are two intermediate pages. If the one bad page does not exceed the first page of the two intermediate pages, it is determined that the one bad page is located in the target storage block.
  • the first half of the available storage interval for example, for example, the starting page number of the available storage interval of the target memory block is F0008, the end page number is F0996, then the middle page is F0502, if the bad page number of the bad page is F0015, the one bad page is in the first half of the available storage interval of the target storage block; as another example, for example, the start page number of the target storage block available storage area is F0008, and the end page number is F0995, then the middle The pages are F0501 and F0502.
  • the number of the one bad page is F0015, because the one bad page does not exceed F0501, the one bad page is in the available storage area of the target storage block
  • the first half it should be understood that the number of the above-described example, only for ease of understanding the present embodiment, the selection of the specific number, should be combined with the actual situation, and flexible setting.
  • the controller may also use the bad page as a separation page to respectively obtain the number of pages in front of the one bad page and the number of pages in the available storage interval of the target storage block The number of pages after the bad page, if the number of pages before the one bad page is greater than the number of pages after the one bad page, it can be determined that the one bad page exists in the first half of the available storage interval of the target storage block. It should be understood that the controller may also determine whether the one bad page exists in the first half of the available storage interval of the target storage block through other methods, which should be flexibly set according to actual conditions.
  • the controller updates the first start page number of the start page of the storage interval information of the target memory block.
  • the controller may obtain the first preset number according to the second start page number of the start page of the good area, so that the start page of the storage interval information of the target storage block
  • the first start page number of is updated to the first preset number; the first start page number of the start page of the storage interval information of the target memory block can also be updated to the second start page number.
  • the first start page number is updated to the first preset number
  • the controller when the controller determines that the second start page number of the start page of the good area exists in the first preset interval, the first preset number is obtained, wherein, in the first preset interval Containing multiple pages, the first preset number is the number of the next page in the first preset interval; the controller updates the first starting page number to the first preset number.
  • a preset interval may be preset in the controller, or multiple preset intervals may be set. If multiple preset intervals are set, multiple preset numbers also exist, The preset number and the preset interval may be in one-to-one correspondence, where the preset interval is an interval including multiple pages, and the first preset interval is the preset interval to which the start page of the good area belongs.
  • the controller may determine the first preset interval to which the start page of the good area belongs according to the second start page number, Furthermore, a first preset number corresponding to the first preset interval is acquired, so that the number of the starting page of the storage interval information of the target storage block can be updated to the first preset number, as an example, for example, the first preset The section contains pages numbered 0001 to 0010, the first preset number is 0010, and when the number of the start page of the good area is 0008, the controller updates the number of the start page of the storage section information of the target memory block to 0010 .
  • the number of the start page of the storage interval information of the target storage block is updated to the corresponding preset number, That is, the starting position of the available storage interval of the target storage block is limited to a specific value. Since the position of the bad page has a specific law, the preset value set of the starting number of the available storage interval can be set according to the statistical law , So that the edges of the available storage interval are aligned, thereby reducing the management complexity of the storage block.
  • the first starting page number is updated to the starting page number of the good area
  • the controller can update the available storage interval of the target storage block by updating the starting page number in the storage interval information of the target storage block
  • the controller can obtain the After the numbering, the first starting page number in the storage interval information of the target storage block is updated to the number of the starting page of the good area, so that the updated storage interval information of the target storage block indicates the availability of the target storage block
  • the storage area is the good area.
  • the available storage interval of the target storage block is directly updated to a good area, which avoids the waste of any pages, further slows down the consumption of redundant blocks, and extends the service life of the storage device.
  • the controller writes at least one page of random data with the page at the top of the sorted position in the good area as a starting position to form an isolation area.
  • the controller may set an isolation area in the good area to divide the good area into an isolation area and a user data area, among which, see FIGS. 3a and 3b
  • the isolation area contains at least one page of random data, located between the at least one bad page and the user data area, and the user data area is used to store valid data.
  • Fig. 3a shows the distribution of the bad page, the isolation area and the user data area when the bad page first appears in the target storage block, and the bad page is located in the first half of the target storage block
  • Fig. 3b shows The distribution of the one bad page, the isolation area, and the user data area when the bad page does not appear for the first time in the target storage block, and the one bad page is located in the first half of the target storage block.
  • the controller may place the sort position in the good area at the top One page is used as the starting position, that is, the next page of the one bad page is used as the starting position, and random data of at least one page is written to form an isolated area.
  • this program interference may further increase.
  • the The top-ranked page in the good area is used as the starting page, and at least one page of random data is written, so that an isolation area is set between the bad page and the user data area, which can block the impact of the bad page on the available pages, thereby Improve the reliability of available storage areas.
  • the controller after the controller determines the good area, it can perform the erase operation on the good area. Since the one bad page is in the first half of the available storage interval of the target memory block, after performing the erase operation on the good area, When the target memory block receives valid data, it triggers the operation of setting the isolation area; it can also set the timer after performing the erase operation on the good area, and triggers the operation of setting the isolation area after the time set by the timer; also The operation of setting the isolation zone can be triggered by other methods. The specific triggering method of setting the isolation zone can be flexibly selected according to the actual situation, and will not be enumerated here one by one.
  • the random data refers to invalid data randomly generated by the controller.
  • the number of pages in the isolation area may be determined according to the particle type of the flash memory particles. Since at a physical level, multiple pages included in a physical block or sub-physical block are physically shown to include multiple layers ( Layer), each layer contains multiple pages, and when setting the isolation area, at least one layer of random data is written, because when the type of flash memory particles is different, the number of pages contained in each layer is different, as an example, for example, when a When the layer contains 12 pages, the number of pages in the isolation area is a multiple of 12 pages; as another example, when the layer contains 24 pages, the number of pages in the isolation area is a multiple of 24. It should be understood that the examples here are only To facilitate understanding of this solution, the number of pages in the specific isolation area should be flexibly selected according to the actual situation, which is not limited here.
  • step 204 may be executed first, and then step 203 may be executed; or step 203 may be executed first, and then step 204 is executed.
  • the controller obtains the difference between the first start page number of the start page and the first end page number of the end page of the available storage interval of the target storage block.
  • the controller may acquire the first start page number and the first end page number of the start page of the available storage interval of the target memory block, thereby determining the first start page number and the first end page The difference between the numbers.
  • the controller marks the target memory block as an unusable memory block.
  • the threshold of the difference may be stored in the controller in advance, so that after determining the difference between the first start page number and the first end page number, it is determined whether the difference reaches the preset threshold, When the preset threshold is reached or below, the memory block may be marked as an unusable memory block; or a threshold value with the difference value pre-stored in the host, the controller is determining the first start page number and the first end After the difference between the page numbers, the difference is sent to the host, and the host determines whether the difference reaches the preset threshold, and when the preset threshold is reached or below, the controller marks the storage block as Unavailable memory block.
  • the storage block where the available storage interval is located is marked as a bad block, so that the storage block is no longer managed, thereby reducing the complexity of the management of the storage block by the controller degree.
  • steps 205 and 206 are optional steps. If steps 205 and 206 are executed, the relationship between steps 205 and 206 and step 204 is not limited. Step 204 can be executed first, and then steps 205 and 206 can be executed; steps can also be executed first 205 and 206, and then execute step 204. If steps 205 and 206 are not executed, step 207 can be entered after step 204 is executed.
  • the controller executes other programs.
  • the bad page is in the second half of the available storage interval
  • another embodiment of the storage block processing method may include:
  • step 401 is similar to step 201 in the embodiment described in FIG. 2 and will not be repeated here.
  • the controller obtains the number of the next page of the one bad page in the available storage interval of the target storage block.
  • the controller may obtain the number of the previous page of the one bad page in the available storage interval of the target memory block, so as to change the start page of the available storage interval of the target memory block to the one From the previous page of the bad page to the included pages are determined as good areas, and the good area is the largest storage area that is continuous among the available storage intervals of the target memory block without the bad page.
  • the number of the starting page of the available storage interval of the target memory block is 0006, the number of the one bad page is 0998, the number of the previous page of the one bad page may be 0997, and the number of the good area is 0006 Multiple pages included in the number 0997; as another example, for example, the end page of the available storage interval of the target memory block is F0006, and the number of the one bad page is F0998, then the previous page of the one bad page The number can be F0997, then the good area is the number of pages contained between F0006 and F0997. It should be understood that the examples here are for convenience only, and the value of any page number is not limited.
  • the controller determines the one according to the bad page number of the one bad page The way that the bad page is in the first half of the available storage interval of the target storage block may be to obtain the number of the start page and the number of the end page of the available storage interval of the target storage block, and then determine whether the bad page exists in the target storage The second half of the block's available storage interval.
  • start page number, end page number, and the bad page number of a bad page in the available storage interval of the target memory block are all page numbers in the form of numbers, then when the bad page occurs in the target memory block, the one The page number of the bad page is PageX, the page number of the start page of the available storage area of the target memory block is PageSt, and the page number of the end page is PageEd, if 2PageX> PageSt + PageEd, that is, the page number of the bad page exceeds the start page The average of the page number of the page and the page number of the end page, then the page number of the bad page indicates that the bad page is in the second half of the available storage interval of the target storage block.
  • the examples of the numbers here are for convenience only. This plan, the specific choice of number, should be flexibly set according to the actual situation.
  • the The number of the start page and the end page of the available storage interval determine the number of the intermediate page.
  • the intermediate page When there are odd pages in the available storage interval of the target storage block, there is one intermediate page. If the bad page exceeds the intermediate page, It is determined that the one bad page is located in the second half of the available storage interval of the target storage block; when there are even pages in the available storage interval of the target storage block, there are two intermediate pages, if the one bad page exceeds the two intermediate pages The first page of the page determines that the one bad page is in the second half of the available storage interval of the target storage block.
  • the controller may also use the one bad page as a separation page to respectively obtain the number of pages in front of the one bad page in the available storage interval of the target storage block and The number of pages behind the one bad page, if the number of pages before the one bad page is less than the number of pages behind the one bad page, it can be determined that the one bad page exists in the second half of the available storage interval of the target storage block section. It should be understood that the controller may also determine whether the one bad page exists in the second half of the available storage interval of the target storage block through other methods, which should be flexibly set according to actual conditions.
  • the controller updates the first termination page number of the termination page of the storage interval information of the target storage block.
  • the controller may obtain the second preset number according to the second end page number of the end page of the good area, so that the second page of the start page of the storage interval information of the target storage block
  • the end page number is updated to the second preset number; the second end page number of the end page of the storage interval information of the target storage block may also be updated to the first end page number, and the above two cases will be described in detail below .
  • the first termination page number is updated to the second preset number
  • the controller updates the first end page number to the second preset number.
  • a preset interval may be preset in the controller, or multiple preset intervals may be set. If multiple preset intervals are set, multiple preset numbers also exist, The preset number and the preset interval may be in one-to-one correspondence, where the preset interval is an interval including multiple pages, and the second preset interval is a preset interval to which the end page of the good area belongs.
  • the controller may determine the second preset interval to which the end page of the good area belongs according to the second end page number, and then acquire the The second preset number corresponding to the two preset intervals, so that the first end page number of the end page of the storage interval information of the target storage block can be updated to the second preset number.
  • the first preset interval contains pages numbered 0990 to 1000, the first preset number is 0990, and when the number of the end page of the good area is 0998, the controller terminates the storage interval information of the target memory block The page number is updated to 0990. It should be understood that the above examples of the number of the second preset interval, the second preset number, and the end page of the good area are only for the convenience of understanding the solution, and the selection of the specific number should be flexibly set according to the actual statistical law.
  • the first termination page number is updated to the first termination page number
  • the controller may update the first end page number of the end page in the storage interval information of the target storage block to the second end page number , So that the updated storage interval information of the target storage block indicates that the available storage interval of the target storage block is the good area.
  • the controller writes the random data of the at least one page with the next page of the user data area as a starting position.
  • the controller may set an isolation area in the good area to divide the good area into an isolation area and a user data area. See FIGS. 5a and 5b.
  • the quarantine area contains at least one page of random data, located between the one bad page and the user data area, and the user data area is used to store valid data.
  • Figure 5a shows the distribution of the bad page, the isolation area and the user data area when the bad page first appears in the target storage block, and the bad page is located in the second half of the target storage block
  • Figure 5b shows It is the distribution of the one bad page, the isolation area and the user data area when the bad page does not appear for the first time in the target storage block and the one bad page is located in the second half of the target storage block.
  • the controller when the bad page number of the one bad page indicates that the sort position of the one bad page is in the second half of the available storage interval of the target memory block, referring to FIG. 6, the controller writes valid data After entering the user data area, it can be determined whether the written valid data has occupied the user data area. If the user data area has been filled, the next page of the user data area is used as the starting position to write the at least one Random data of the page to form the isolated area.
  • the storage block since the one bad page is in the second half of the available storage interval of the target storage block, and the storage block writes data in order according to the order of the pages, it is determined whether the written valid data is full of user data
  • the method of the area may be: after determining the number of pages in the isolation area, determine the number of the end page of the user data area according to the number of the end page of the good area and the number of pages in the isolation area, and the controller may execute each time in the target storage block After the write operation, obtain the number of the last page of the page where valid data has been written, and determine whether the number of valid data written has occupied the user data by judging whether the number of the last page reaches the number of the end page of the user data area Area.
  • the number of the end page of the good area is 0990
  • the number of pages in the quarantine area is 12
  • the number of the end page of the user data area is 0978. If the number of the last page of the page where valid data has been written is 0920, the user data area is not occupied. It should be understood that the example of numbering here is only for convenience of understanding and has no limiting meaning.
  • the controller obtains the difference between the first start page number and the first end page number of the start page of the available storage interval of the target storage block.
  • the controller marks the target memory block as an unusable memory block.
  • the controller executes other programs.
  • steps 405 to 407 are similar to steps 205 to 207 in the embodiment described in FIG. 2 and will not be repeated here.
  • the controller when it detects that there are at least two bad pages in the target storage block, it may use the available storage for the target storage block according to at least two bad page positions corresponding to the at least two bad pages The interval is divided to determine the good area.
  • the controller can process the at least two bad pages page by page; it can also determine an edge bad page according to the position of the at least two bad pages, where the edge bad page is the top position or the bottom position of the at least two bad pages A bad page, and then using the edge bad page as the position of the separation page, divide the available storage interval of the target storage block to determine the good area.
  • the controller processes the at least two bad pages page by page.
  • another embodiment of the storage block processing method may include:
  • the controller detects that there are at least two bad pages in the target storage block, acquire at least two bad page positions corresponding to the at least two bad pages.
  • step 703 is entered; if not, step 812 is entered.
  • the controller when the controller detects that there are at least two bad pages in the target storage block, the controller may obtain at least two bad page positions corresponding to the at least two bad pages, the at least two bad pages
  • the location includes a target bad page location corresponding to the target bad page, and the target bad page is any one of the at least two bad pages, so that the controller can obtain the target bad page location.
  • the target bad page position may be the target bad page number corresponding to the target bad page.
  • the controller since the controller first obtains at least two bad pages containing the target bad page, and then processes the at least two bad pages one by one, there may be one that does not exist in the target storage block among the at least two bad pages
  • the bad pages of the available storage area as an example, for example, the controller detects three bad pages, the bad page number of the first bad page is 0012, the bad page number of the second bad page is 0008, the first bad page The bad page number is 0016, after the controller processes the first bad page, the starting page number of the available storage interval of the target memory block is 0012, when the second bad page is processed, the second The bad page does not exist in the available storage interval of the target storage block.
  • the examples of the three bad pages here are only for easy understanding. The specific bad page number should be flexibly set according to the actual situation. Be limited.
  • the controller uses the target bad page position as the separation page when determining that the target bad page exists in the available storage section of the target storage block according to the target bad page position
  • the location of the target memory block is divided to determine the good area. That is, the controller may determine whether the target bad page exists in the available storage interval of the target storage block according to the target bad page number. If yes, go to step 703; if no, go to step 812.
  • the controller judges whether the target bad page exists in the first half of the available storage interval of the target storage block. If it exists in the first half, it proceeds to step 704; if it does not exist in the first half, it proceeds to step 707.
  • the controller may determine whether the target bad page exists in the first half of the available storage interval of the target storage block according to the page number of the target bad page, and according to the target bad page
  • the controller may determine whether the target bad page exists in the available storage interval of the target storage block according to the page number of the target bad page, and according to the target bad page
  • step 202 provides how to determine the target page based on the bad page number of a bad page. Whether the bad page exists in the first half of the available storage interval of the target storage block.
  • the target bad page is also any one of the at least two bad pages. Therefore, specific The implementation manner is similar to how to determine whether a bad page exists in the first half of the available storage interval of the target storage block according to the bad page number of the bad page in step 202, and details are not described here.
  • the controller obtains the number of the next page of the target bad page in the available storage interval of the target storage block.
  • the controller updates the first start page number of the start page of the storage information of the target storage block.
  • the controller writes at least one page of random data using the page with the highest sorting position in the good area as a starting position to form an isolation area.
  • steps 704 to 706 are similar to steps 202 to 204 in the embodiment described in FIG. 2, the difference is that steps 202 to 204 perform corresponding operations according to a bad page number of a bad page, and in this embodiment are based on Perform the corresponding operation on the bad page number of the target bad page, which will not be repeated here.
  • the controller obtains the number of the previous page of the target bad page in the available storage interval of the target storage block.
  • the controller updates the first termination page number of the termination page of the storage information of the target storage block.
  • the controller writes the random data of the at least one page with the next page of the user data area as a starting position.
  • steps 707 to 709 are similar to steps 402 to 404 in the embodiment described in FIG. 4, the difference is that steps 402 to 404 perform corresponding operations according to a bad page number of a bad page. In this embodiment, it is based on Perform the corresponding operation on the bad page number of the target bad page, which will not be repeated here.
  • the controller obtains the difference between the first start page number and the first end page number of the start page of the available storage interval of the target storage block.
  • the controller marks the target memory block as an unusable memory block.
  • steps 810 and 811 are similar to steps 205 and 206 in the embodiment described in FIG. 2 and will not be repeated here.
  • the controller executes other programs.
  • the controller after acquiring the target bad page position corresponding to the target bad page, the controller does not acquire the target bad page in the case that the target bad page exists in the unavailable storage section of the target storage block. Good area, and the storage interval information of the target storage block is not updated.
  • the controller when it detects that there is a bad page in the target memory block, it can obtain the number of the bad page, and obtain the number of the start page and the end page of the target memory block recorded by the controller. Record the available storage interval of each memory block. If the number of the bad page is not between the number of the start page and the number of the end page, it is determined that the bad page occurs in the unusable storage interval of the target memory block. Therefore, The existence of the bad page does not affect the available storage interval of the target storage block, so that the controller may not acquire the good area, and may not update the storage interval information of the target storage block.
  • control terminal since the control terminal detects at least two bad pages, the control terminal may repeatedly perform steps 702 to 812 to process the at least two bad pages page by page.
  • another embodiment of the storage block processing method may include:
  • step 801 is similar to step 701 in the embodiment described in FIG. 7, and steps 803 to 811 are similar to steps 704 to 712 in the embodiment described in FIG. 7, the only difference is that this embodiment is based on the bad edge
  • the corresponding operation is performed on the bad page number of the page. In the embodiment described in FIG. 7, the corresponding operation is performed according to the bad page number of the target bad page, which will not be repeated here.
  • this embodiment further includes:
  • the controller obtains the position of the edge bad page corresponding to the edge bad page.
  • the controller may determine an edge bad page according to the at least two bad page numbers, and the edge bad page is a bad position in which the sort position is at the top or the sort position is at the bottom in the at least two bad pages page.
  • the at least two bad pages may be acquired
  • the bad page position of the bad page with the middle sort position at the bottom is taken as the edge bad page position, and step 803 is entered.
  • step 806 is entered.
  • the controller may obtain the edge bad pages in the at least two bad pages, so that only the edge bad pages are available to the target storage block
  • the storage interval is divided to avoid repeated operations when processing the at least two bad pages page by page, thereby improving the efficiency of processing the bad pages.
  • the controller is applied to a storage device, and the controller is applied to a storage device.
  • the storage device includes the controller and the memory, and the memory includes multiple storage blocks.
  • the storage block contains multiple pages, and the controller contains storage interval information for each storage block.
  • the storage interval information is used to determine the available storage interval of the storage block.
  • the controller includes:
  • the obtaining unit 901 is configured to obtain the position of at least one bad page corresponding to the at least one bad page when it is detected that at least one bad page exists in the target storage block;
  • the determining unit 902 is configured to determine a good area according to the position of the at least one bad page; wherein, the good area is the largest storage area that is continuous among the available storage intervals of the target storage block and does not exist the bad page;
  • the updating unit 903 is configured to update the storage interval information of the target storage block, wherein the updated storage interval information of the target storage block indicates that the available storage interval of the target storage block is the good area.
  • the available storage interval of the target storage block of the storage block may be divided according to the position of the bad page, so that the determining unit 902 does not identify the available storage interval of the target storage block.
  • the maximum continuous interval containing the bad page is determined as a good area, and then the update unit 903 updates the available storage interval of the storage block according to the good area, avoiding directly marking the entire storage block as a bad block, and slowing down the redundant block Consumption, prolongs the service life of the solid state drive, and because the consumption of redundant blocks is reduced, the increase of the write amplification factor is also avoided, and the service life of the solid state drive is further extended; in addition, the application can also be applied to other storage blocks Storage devices, thereby extending the life of storage devices.
  • the at least one bad page is a bad page
  • the determining unit 902 is specifically configured to divide the available storage interval of the target storage block by using the position of the bad page of the one bad page as the position of the separation page to determine the good area.
  • the bad page position of the one bad page includes the bad page number of the one bad page
  • the storage interval information of the target storage block includes the first starting page of the start page of the available storage interval of the target storage block Start page number, the bad page number of the one bad page and the first start page number are used to determine the multiple pages contained in the target memory block by the start page of the one bad page and the available storage interval of the target memory block Sort position in
  • the determination unit 902 is specifically used for:
  • the sort position of the one bad page is determined according to the bad page number of the one bad page in the first half of the available storage interval of the target storage block, the lower part of the one bad page in the available storage interval of the target storage block is acquired
  • the number of one page to determine that the multiple pages contained in the next page of a bad page to the end page of the available storage interval of the target memory block are the good areas;
  • the updating unit 903 is specifically configured to: update the first starting page number to the number of the next page of the one bad page.
  • the bad page position of the one bad page includes the bad page number of the one bad page
  • the storage interval information of the target storage block includes the first termination of the end page of the available storage interval of the target storage block
  • the page number, the bad page number of the one bad page and the first end page number are respectively used to determine the end page of the available storage interval of the one bad page and the target memory block among the multiple pages included in the target memory block Sort position
  • the determination unit 902 is specifically used for:
  • the updating unit 903 is specifically configured to: update the first termination page number to the previous page number of the one bad page.
  • the determination unit 902 is specifically used for:
  • the available storage interval of the target storage block is divided using the target bad page location as the position of the separation page to determine Good area.
  • the controller also includes:
  • the setting unit 904 is configured to set an isolation area in the good area to divide the good area into an isolation area and a user data area, wherein the isolation area contains random data of at least one page, and is located on the at least one bad page and the Between user data areas, the user data area is used to store valid data.
  • the at least one bad page location includes at least one bad page number corresponding to the at least one bad page one by one, and the at least one bad page number is used to determine that the bad page is included in the target storage block Sorting position in multiple pages,
  • the setting unit 904 is specifically used for:
  • the at least one bad page location includes at least one bad page number corresponding to the at least one bad page one by one, and the at least one bad page number is used to determine that the bad page is included in the target storage block Sorting position in multiple pages,
  • the setting unit 904 is specifically used for:
  • the sorting position of the at least one bad page is in the second half of the available storage interval of the target memory block, if the written valid data has already occupied the user data area, use the The next page of the user data area is the starting position, and the random data of the at least one page is written to form the isolation area.
  • the storage interval information of the target storage block includes the first start page number of the start page of the available storage interval of the target storage block, and there are multiple pages in the good area that have the good area Start page, the second start page number and the first start page number of the start page of the good area are used to determine the start page of the good area and the start page of the available storage interval of the target memory block in The sort position in the multiple pages contained in the target storage block;
  • the obtaining unit 901 is also used to:
  • the first preset number is obtained, where the first preset interval includes multiple pages, the The first preset number is the number of the next page of the first preset interval;
  • the updating unit 903 is specifically configured to: update the first starting page number to the first preset number.
  • the storage interval information of the target storage block includes the first end page number of the end page of the available storage interval of the target storage block, and the multiple areas included in the good area have the end of the good area Page, the second end page number and the first end page number of the end page of the good area are used to determine the end page of the good area and the end page of the available storage interval of the target storage block included in the target storage block Sorting position in multiple pages;
  • the obtaining unit 901 is also used to:
  • a second preset number is obtained, where the second preset interval includes multiple pages, the second The preset number is the number of the previous page of the second preset interval;
  • the updating unit 903 is specifically configured to: update the first termination page number to the second preset number.
  • the storage interval information of the target storage block includes the first start page number of the start page of the available storage interval of the target storage block and the first end page number of the end page;
  • the acquiring unit 901 is further configured to: acquire the difference between the first start page number and the first end page number;
  • the controller also includes:
  • the marking unit 905 is configured to mark the target storage block as an unusable storage block when the difference reaches a preset threshold.
  • An embodiment of the present application further provides a storage device, the storage device includes a controller and a memory, the memory includes a storage block, and the storage block includes multiple pages;
  • controller is used to execute the steps performed by the controller in the method described in the foregoing embodiments shown in FIG. 2 to FIG. 8, and is also used to generate instructions;
  • the memory is used to store data according to the instruction.
  • the storage device may be a non-embedded storage device or an embedded storage device. It should be understood that the specific expression form of the storage device should be flexibly set according to actual conditions, and is not limited herein.
  • An embodiment of the present application further provides a terminal.
  • the terminal includes an interface, a processor, and a storage device.
  • the storage device includes a controller and a memory.
  • the memory includes a storage block.
  • the storage block includes multiple pages. ;
  • the processor sends data to the controller through the interface
  • the controller is used to perform the steps performed by the controller in the method described in the foregoing embodiments shown in FIG. 2 to FIG. 8, and is also used to receive the data sent by the processor through the interface and generate instructions;
  • the memory is used to store the data according to the instruction.
  • An embodiment of the present application also provides a computer program product containing storage block management instructions, which when executed on a computer, causes the computer to execute the method as described in the foregoing embodiments shown in FIGS. 2 to 8 by the controller A step of.
  • An embodiment of the present application also provides a computer-readable storage medium, which stores instructions for processing a storage block, and when it runs on a computer, causes the computer to execute as shown in FIGS. 2 to 8 described above The steps performed by the controller in the method described in the embodiments.
  • An embodiment of the present application further provides a chip system including a processor, which is used to support a network device to implement the functions involved in the above aspects, for example, for example, to send or process data and / or information involved in the above method .
  • the chip system further includes a memory, which is used to store necessary program instructions and data of the network device.
  • the chip system may be composed of chips, and may also include chips and other discrete devices.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
  • Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from a website site, computer, server, or data center via wire (e.g. Coaxial cable, optical fiber, digital subscriber line (digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website, computer, server or data center for transmission.
  • wire e.g. Coaxial cable, optical fiber, digital subscriber line (digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device including a server, a data center, and the like integrated with one or more available media.
  • the available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media, such as solid state disks (SSD).
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of units is only a division of logical functions.
  • there may be other divisions for example, multiple units or components may be combined or integrated To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or software function unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application may be essentially or part of the contribution to the existing technology or all or part of the technical solution may be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

L'invention concerne un procédé de traitement d'un bloc de stockage, comprenant les étapes suivantes : après détection qu'au moins une page défectueuse est comprise dans un bloc de stockage cible, obtenir au moins une position de page défectueuse ayant une correspondance biunivoque avec ladite au moins une page défectueuse; déterminer une bonne zone selon ladite au moins une position de la page défectueuse, ladite bonne zone étant l'intervalle de stockage maximal continu qui ne comprend pas la page défectueuse dans l'intervalle de stockage disponible du bloc de stockage cible; et mettre à jour des informations d'intervalle de stockage du bloc de stockage cible, lesdites informations d'intervalle de stockage mises à jour du bloc de stockage cible indiquant que l'intervalle de stockage disponible du bloc de stockage cible est la bonne zone. Des modes de réalisation de l'invention concernent également un terminal correspondant, un produit programme infprmatique, et un support de stockage lisible par ordinateur. Selon l'invention, lorsque la page défectueuse est comprise dans le bloc de stockage, l'intervalle de stockage maximal continu qui ne comprend pas la page défectueuse dans le bloc de stockage est obtenu, et continue d'être utilisé de façon à éviter le marquage direct du bloc de stockage global comme bloc défectueux, à réduire la consommation de blocs redondants, et à prolonger la durée de vie d'un dispositif de stockage.
PCT/CN2018/110223 2018-10-15 2018-10-15 Procédé de traitement de bloc de stockage, et dispositif associé WO2020077489A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/110223 WO2020077489A1 (fr) 2018-10-15 2018-10-15 Procédé de traitement de bloc de stockage, et dispositif associé
CN201880098515.6A CN112805686B (zh) 2018-10-15 2018-10-15 一种存储块处理方法及相关设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/110223 WO2020077489A1 (fr) 2018-10-15 2018-10-15 Procédé de traitement de bloc de stockage, et dispositif associé

Publications (1)

Publication Number Publication Date
WO2020077489A1 true WO2020077489A1 (fr) 2020-04-23

Family

ID=70282861

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/110223 WO2020077489A1 (fr) 2018-10-15 2018-10-15 Procédé de traitement de bloc de stockage, et dispositif associé

Country Status (2)

Country Link
CN (1) CN112805686B (fr)
WO (1) WO2020077489A1 (fr)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114063905B (zh) * 2021-10-13 2024-04-02 武汉光迅电子技术有限公司 日志存储方法、日志存储装置、存储设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102298543A (zh) * 2011-09-15 2011-12-28 成都市华为赛门铁克科技有限公司 一种存储器管理方法和装置
CN106681936A (zh) * 2016-12-29 2017-05-17 记忆科技(深圳)有限公司 一种nandflash的坏块管理方法
CN106681664A (zh) * 2016-12-29 2017-05-17 忆正科技(武汉)有限公司 一种用于提高固态硬盘使用寿命的管理策略

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8775901B2 (en) * 2011-07-28 2014-07-08 SanDisk Technologies, Inc. Data recovery for defective word lines during programming of non-volatile memory arrays
KR101797565B1 (ko) * 2011-08-22 2017-12-12 삼성전자 주식회사 불량 페이지를 관리하는 메모리 장치
KR20130078973A (ko) * 2012-01-02 2013-07-10 삼성전자주식회사 메모리 장치의 불량 저장 영역 관리 방법 및 이를 이용한 저장 장치
CN102622306B (zh) * 2012-02-21 2014-11-26 中颖电子股份有限公司 存储装置的坏块管理方法
US9318168B2 (en) * 2012-11-27 2016-04-19 Samsung Electronics Co., Ltd. Memory system for continuously mapping addresses of a memory module having defective locations
EP3260985B1 (fr) * 2014-06-27 2019-02-27 Huawei Technologies Co., Ltd. Contrôleur, appareil à mémoire flash et procédé d'écriture de données dans un appareil à mémoire flash
WO2017095911A1 (fr) * 2015-12-01 2017-06-08 Huang Yiren Ronnie Procédé et appareil pour supprimer logiquement des pages défectueuses dans un dispositif de stockage de mémoire non-volatile
KR20170131796A (ko) * 2016-05-20 2017-11-30 에스케이하이닉스 주식회사 메모리 시스템 및 메모리 시스템의 동작 방법

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102298543A (zh) * 2011-09-15 2011-12-28 成都市华为赛门铁克科技有限公司 一种存储器管理方法和装置
CN106681936A (zh) * 2016-12-29 2017-05-17 记忆科技(深圳)有限公司 一种nandflash的坏块管理方法
CN106681664A (zh) * 2016-12-29 2017-05-17 忆正科技(武汉)有限公司 一种用于提高固态硬盘使用寿命的管理策略

Also Published As

Publication number Publication date
CN112805686A (zh) 2021-05-14
CN112805686B (zh) 2023-06-06

Similar Documents

Publication Publication Date Title
US10936394B2 (en) Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
CN106448737B (zh) 读取闪存数据的方法、装置以及固态驱动器
CN103635969B (zh) 包含存储器系统控制器的设备和相关方法
US20190087348A1 (en) Data backup method, data recovery method and storage controller
TWI551991B (zh) 記憶體管理方法與系統及其記憶體儲存裝置
US20200183831A1 (en) Storage system and system garbage collection method
US10635358B2 (en) Memory management method and storage controller
US9563498B2 (en) Method for preventing read-disturb errors, memory control circuit unit and memory storage apparatus
US10990325B2 (en) Write control method, associated data storage device and controller thereof
US20140143476A1 (en) Usage of cache and write transaction information in a storage device
EP3229147A1 (fr) Procédé, dispositif et système informatique de traitement de transaction
US10204003B2 (en) Memory device and storage apparatus
CN113490922B (zh) 固态硬盘写放大优化方法
TW202028981A (zh) 資料儲存裝置及避免韌體失效之方法
TW201133240A (en) System recovery method, and storage medium controller and storage system using the same
WO2020103468A1 (fr) Procédé de traitement d'informations superflues basé sur mémoire flash, disque à semi-conducteurs et dispositif de stockage
WO2020077489A1 (fr) Procédé de traitement de bloc de stockage, et dispositif associé
CN106814968B (zh) 存储器管理方法与系统及其存储器存储装置
US11016689B2 (en) Data storage system
CN107817943A (zh) 数据传输方法、存储器存储装置及存储器控制电路单元
CN104375945A (zh) 存储器地址管理方法、存储器控制器与存储器储存装置
US9262424B1 (en) Techniques for performing slice consistency checks
CN112578993A (zh) 多平面nvm处理编程出错的方法与存储设备
US20200073590A1 (en) Memory management method and storage controller
CN112579328A (zh) 处理编程出错的方法与存储设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18937190

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18937190

Country of ref document: EP

Kind code of ref document: A1