CN112463656B - Method and system for recovering abnormal power failure of solid state disk and storage medium - Google Patents

Method and system for recovering abnormal power failure of solid state disk and storage medium Download PDF

Info

Publication number
CN112463656B
CN112463656B CN202011343921.XA CN202011343921A CN112463656B CN 112463656 B CN112463656 B CN 112463656B CN 202011343921 A CN202011343921 A CN 202011343921A CN 112463656 B CN112463656 B CN 112463656B
Authority
CN
China
Prior art keywords
solid state
state disk
power failure
operation instruction
storage block
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202011343921.XA
Other languages
Chinese (zh)
Other versions
CN112463656A (en
Inventor
边红蕾
宋欣
弗兰克·陈
张晓霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhiyu Technology Co ltd
Original Assignee
Exascend Technology Wuhan Co ltd
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 Exascend Technology Wuhan Co ltd filed Critical Exascend Technology Wuhan Co ltd
Priority to CN202011343921.XA priority Critical patent/CN112463656B/en
Publication of CN112463656A publication Critical patent/CN112463656A/en
Application granted granted Critical
Publication of CN112463656B publication Critical patent/CN112463656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0873Mapping of cache memory to specific storage devices or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/20Initialising; Data preset; Chip identification

Abstract

The invention provides a method, a system and a storage medium for recovering abnormal power failure of a solid state disk, wherein the method comprises the following steps: after a host is started and powered on, acquiring the last power failure condition of a solid state disk; when the solid state disk is abnormally powered off last time, preparing a cache storage block, controlling to execute a data writing command in the cache storage block, and synchronously executing a data transfer operation instruction for enabling each storage unit of the solid state disk not to be fully written on the logic storage block; and when the execution of the data transfer operation instruction is finished, recovering the cache storage block, and controlling the solid state disk to execute a recovery operation instruction for finishing the abnormal power failure and reestablishing the logic storage block information. By additionally arranging a cache storage block, controlling to execute a data writing command in the cache storage block and synchronously executing a data transfer operation instruction; compared with the prior art, the method has the advantages that the host disk identification speed is remarkably improved, and the writable waiting time of data is reduced; flash errors which cannot be corrected are avoided; the safety of data written before abnormal power failure is ensured.

Description

Method and system for recovering abnormal power failure of solid state disk and storage medium
Technical Field
The invention relates to the technical field of abnormal power failure processing of computers, in particular to a method and a system for recovering abnormal power failure of a solid state disk and a storage medium.
Background
The abnormal power failure refers to the situation that the power supply of the SSD (solid State drive) is forcibly cut off under the condition that a host power failure notice is not received, and the firmware of the SSD is not in time to do any operation. The abnormal power failure recovery refers to a process that the solid state disk can respond to various commands of the host after being powered on, and mainly includes a process of reestablishing the mapping table and recovering the logical storage block information.
For mlc (multiple Level cell)/tlc (triple Level cell) FLASH used by current mainstream solid state disk SSD, if fw (firmware) is writing upper/extra page when abnormal power failure occurs, data of lower page located in the same word line may be damaged; in addition, for an incomplete storage block open block found in the recovery stage, a read flash memory bare-chip storage page in an empty state may also be a page in which writing is not completed in a power failure process, so that the SSD firmware cannot accurately judge the last written position before the power failure. Wherein, MLC FLASH refers to a FLASH memory medium of which a storage unit can store 2 bits of data, and TLC FLASH refers to a FLASH memory medium of which a storage unit stores 3 bits of data. If valid data continues to be written to such die page, there is a risk of a subsequent read error.
Based on the characteristics of the Flash media Flash, in the abnormal power failure recovery process of the SSD firmware, for an Open Row Block which is not fully written in a logic storage Block, a general strategy is to perform Folding operation on the SSD firmware so that the firmware can better manage the logic storage Block Row Block, and the process needs to consume a long time T; the flow defines a behavior of performing valid data arrangement on the designated logical storage Block Row Block and moving the logical storage Block Row Block to other logical storage blocks Row Block.
Before the Folding process is not completed, the SSD cannot respond to a write command sent by a Host; if the User data is divided into 2 bands, the Folding time is changed into 2T, and the recovery time of abnormal power failure of the SSD firmware is greatly influenced by the Folding time; with the development of NAND Flash technology of a nonvolatile storage medium Flash memory chip, the capacity of a single Block of memory is larger and larger, and especially with the advent of 3D TLC FLASH (Flash memory medium with one memory cell storing 3 bits of data), the capacity of a single Row Block is also larger, and the time T is also larger and larger. In a typical SSD designed as used Micron B17A, User data is divided into 2 bands, and the power failure recovery time of 512GB/1TB/2T/4TB in an extreme case is 30s/40s/60s/90 s; the current recovery time has become less and less satisfactory for customers' requirements for shorter system startup times.
Disclosure of Invention
The invention aims to overcome the defects of the background technology and provides a method, a system and a storage medium for recovering abnormal power failure of a solid state disk.
In a first aspect, the present invention provides a method for recovering abnormal power failure of a solid state disk, including the following steps:
after a host is started and powered on, acquiring the last power failure condition of a solid state disk;
when the solid state disk is abnormally powered down last time, preparing a cache storage block, controlling to execute a data writing command in the cache storage block, and synchronously executing a data transfer operation instruction on a logic storage block which is not fully written with each storage unit of the solid state disk;
when the execution of the data transfer operation instruction is completed, recovering the cache storage block;
and controlling the solid state disk to execute a recovery operation instruction for completing the abnormal power failure and reestablishing the logic storage block information.
According to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the step of "recovering the cache memory block when the data transfer operation instruction is executed completely" specifically includes the following steps:
acquiring the execution condition of a data transfer operation instruction on a logic storage block which is not fully written in each storage unit of the solid state disk;
and when the execution of the data transfer operation instruction of the logic storage block is not fully written in each storage unit of the solid state disk, controlling to execute the operation instruction for transferring the data on the cache storage block to the user storage unit.
According to the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, before the step of "obtaining the last power-down condition of the solid state disk after the host is powered on", the method further includes the following steps:
and controlling the solid state disk to execute a hardware initialization operation instruction and a data structure initialization operation instruction.
According to a third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, after the step of controlling the solid state disk to execute the hardware initialization operation instruction and the data structure initialization operation instruction, the method further includes the following steps:
and controlling the solid state disk hardware to execute a PCIe (peripheral component interface Express) interface initialization operation instruction and an NVME (Non-Volatile Memory Express) protocol initialization operation instruction.
According to a third possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, after the step of "executing the operation instruction for hardware initialization and data structure initialization of the solid state disk", the method further includes the following steps:
controlling the solid state disk to execute an operation instruction for reestablishing the mapping table;
and controlling the solid state disk to execute a recovery task instruction for completing the reestablishment of the mapping table after the abnormal power failure.
According to a fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the step of controlling the solid state disk to execute a recovery operation instruction for reestablishing a complete mapping table specifically includes the following steps:
acquiring a physical page address PPA finally written into a mapping data area before abnormal power failure of the solid state disk;
according to the obtained PPA, obtaining a mapping table which is read from a mapping data area and stored last time before abnormal power failure of the solid state disk occurs, and taking the mapping table as a basic mapping table;
and controlling the solid state disk to execute a recovery operation instruction for sequentially reading the data of the user data area and reestablishing a complete mapping table according to the obtained basic mapping table.
According to the first possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the step of obtaining the physical page address PPA that is last written in the user data area before the abnormal power failure of the solid state disk specifically includes the following steps:
executing scanning operation instructions of all logic storage block states for storing user data, and acquiring all logic storage block states for storing user data;
according to the obtained states of all logic storage blocks storing the user data and the old and new degree of the time stamps, controlling all the logic storage blocks storing the user data to be sequenced from old to new according to the time stamps to obtain a logic storage block queue;
and acquiring a physical page address PPA of the last logical storage block in the logical storage block queue, which is written into the user data area before the abnormal power failure of the solid state disk.
In a second aspect, the present invention provides a system, including a first obtaining unit, a first control unit, and a second control unit, where the first obtaining unit is configured to obtain a last power-down condition of a solid state disk after a host is powered on; the first control unit is in communication connection with the first acquisition unit and is used for controlling to execute a data writing command in the cache storage block and synchronously executing a data transfer operation instruction for enabling each storage unit of the solid state disk not to be fully written in the logic storage block when the solid state disk is abnormally powered down last time; and the second control unit is in communication connection with the first control unit and is used for recovering the cache storage block when the execution of the data transfer operation instruction on the logic storage block is completed when each storage unit of the solid state disk is not fully written.
According to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the apparatus further includes a second obtaining unit, the second control unit is connected to the first control unit through the second obtaining unit in a communication manner, and the second obtaining unit is configured to obtain an execution completion condition of the data transfer operation instruction on the logical storage block that is not fully written in each storage unit of the solid state disk.
In a third aspect, the present invention provides a storage medium, where a computer program is stored on the storage medium, and when executed by a processor, the computer program implements the method for recovering abnormal power failure of a solid state disk as described above.
Compared with the prior art, the invention has the following advantages:
by additionally arranging a cache storage block, controlling to execute a data writing command in the cache storage block, and synchronously executing a data transfer operation instruction on each storage unit of the solid state disk, which is not fully written in the logic storage block; compared with the abnormal power failure recovery method in the prior art, which executes the data transfer operation instruction on the logic storage block which is not fully written first and then writes the data, the method has the advantages that the disk identification speed of the host is obviously improved, the write-in waiting time of the data is reduced, and the quick starting requirement of a user on the operating system is met; the problem that an uncorrectable Flash error occurs when reading an unfilled logic storage block during abnormal power failure is avoided; the safety of data written before the abnormal power failure recovery is ensured; meanwhile, the problem that the user experience is influenced by the uncorrectable Flash reading error when the data is read in a delayed mode is solved.
Drawings
FIG. 1 is a flow chart of a method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of another method provided by an embodiment of the present invention;
fig. 3 is a functional block diagram of a system according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the present embodiments of the invention, examples of which are illustrated in the accompanying drawings. While the invention will be described in conjunction with the specific embodiments, it will be understood that they are not intended to limit the invention to the embodiments described. On the contrary, it is intended to cover alternatives, modifications, and equivalents as may be included within the spirit and scope of the invention as defined by the appended claims. It should be noted that the method steps described herein may be implemented by any functional block or functional arrangement and that any functional block or functional arrangement may be implemented as a physical entity or a logical entity, or a combination of both.
In order that those skilled in the art will better understand the present invention, the following detailed description of the invention is provided in conjunction with the accompanying drawings and the detailed description of the invention.
Note that: the example to be described next is only a specific example, and does not limit the embodiments of the present invention necessarily to the following specific steps, values, conditions, data, orders, and the like. Those skilled in the art can, upon reading this specification, utilize the concepts of the present invention to construct more embodiments than those specifically described herein.
Referring to fig. 1, the present invention provides a method for recovering abnormal power failure of a solid state disk, including the following steps:
s100, obtaining the last power failure condition of the solid state disk after the host is powered on;
s200, when the solid state disk is abnormally powered down last time, preparing a cache storage block, controlling to execute a data writing command in the cache storage block, and synchronously executing a data transfer operation instruction for enabling each storage unit of the solid state disk not to be fully written in a logic storage block; the last abnormal power failure is defined as the abnormal power failure of the solid state disk before the host is electrified, the buffer storage block is arranged in a newly applied unwritten data logic storage block in a storage unit of the solid state disk, and the data is transferred to another newly applied unwritten data logic storage block in the storage unit.
S300, when the execution of the data transfer operation instruction is finished, the cache storage block is recovered, and the solid state disk is controlled to execute a recovery operation instruction for finishing abnormal power failure and reestablishing the logic storage block information.
The method comprises the steps of preparing a cache storage block, controlling to execute a data writing command in the cache storage block, and synchronously executing a data transfer operation instruction on a logic storage block which is not fully written in each storage unit of a solid state disk; compared with the abnormal power failure recovery method in the prior art, which executes the data transfer operation instruction on the logic storage block which is not fully written first and then writes the data, the method has the advantages that the disk identification speed of the host is obviously improved, the write-in waiting time of the data is reduced, and the quick starting requirement of a user on the operating system is met; the problem that an uncorrectable Flash error occurs when reading an unfilled logic storage block during abnormal power failure is avoided; the safety of data written before abnormal power failure is ensured; meanwhile, the problem that the user experience is influenced by the fact that uncorrectable Flash reading errors are encountered when data are read in a delayed mode is avoided.
Referring to fig. 2, the step of "recovering the cache memory block when the data transfer operation instruction is executed completely" includes the following steps:
s210, acquiring the execution condition of a data transfer operation instruction on a logic storage block of the solid state disk, wherein each storage unit of the solid state disk is not fully written with the data transfer operation instruction;
s220, when the execution of the data transfer operation instruction of the logic storage block is not fully written in each storage unit of the solid state disk, controlling to execute the operation instruction of transferring the data on the cache storage block to the user storage unit.
In an embodiment, before the step of obtaining the last power-down condition of the solid state disk after the host is powered on, the method further includes the following steps:
and controlling the solid state disk to execute a hardware initialization operation instruction and a data structure initialization operation instruction.
In some embodiments, after the step of controlling the solid state disk to execute the hardware initialization operation instruction and the data structure initialization operation instruction, the method further includes the following steps:
the solid state disk hardware is controlled to execute an PCIe (peripheral component interface Express) interface initialization operation instruction and an NVME (Non-Volatile Memory Express) protocol initialization operation instruction, and the disk identification speed of the host is improved.
In some embodiments, after the step of executing the initialization operation instruction of the initial combination data structure of the solid state disk hardware, the method further includes the following steps:
controlling the solid state disk to execute an operation instruction for reestablishing the mapping table;
and controlling the solid state disk to execute a recovery task instruction for completing the reestablishment of the mapping table of the abnormal power failure, and completing the complete recovery process of the abnormal power failure on the solid state disk by combining the operation of reestablishing the logic storage block information.
In some embodiments, the step of controlling the solid state disk to execute a recovery operation instruction for reestablishing the complete mapping table includes the following steps:
acquiring a physical page address PPA finally written into a mapping data area before abnormal power failure of the solid state disk;
according to the obtained PPA, obtaining a mapping table which is read from a mapping data area and stored for the last time before the abnormal power failure of the solid state disk occurs, and taking the mapping table as a basic mapping table;
according to the obtained basic mapping table, obtaining a time stamp Epoch in the operation of the solid state disk firmware, recording a current time stamp mEpoch when the time stamp mEpoch is written into the mapping table Map Band every time, reading the mapping relation between the recorded logical address and the physical address on the logical storage block of which the Epoch is greater than the mEpoch, recovering a complete mapping table, and controlling the solid state disk to execute a recovery operation instruction for reading the user data area data according to the time stamp sequence and rebuilding the complete mapping table.
In an embodiment, the step of obtaining the physical page address PPA written into the user data area last before the abnormal power failure of the solid state disk specifically includes the following steps:
executing scanning operation instructions of all logic storage block states for storing user data, and acquiring all logic storage block states for storing user data;
according to the obtained states of all logic storage blocks storing the user data and the old and new degree of the time stamps, controlling all the logic storage blocks storing the user data to be sequenced from old to new according to the time stamps to obtain a logic storage block queue;
and acquiring a physical page address PPA of the last logical storage block in the logical storage block queue, which is written into the user data area before the abnormal power failure of the solid state disk.
Based on the same inventive concept, the invention provides a system, which comprises a first acquisition unit 110, a first control unit 120 and a second control unit 140, wherein the first acquisition unit is used for acquiring the last power-down working condition of a solid state disk after a host is started and powered on; the first control unit is in communication connection with the first acquisition unit and is used for controlling to execute a data writing command in the cache storage block and synchronously executing a data transfer operation instruction for enabling each storage unit of the solid state disk not to be fully written in the logic storage block when the solid state disk is abnormally powered down last time; and the second control unit is in communication connection with the first control unit and is used for recovering the cache storage block when the execution of the data transfer operation instruction on the logic storage block is not fully written in each storage unit of the solid state disk.
The system remarkably improves the disk identification speed of a host and reduces the writable waiting time of data by synchronously executing a data writing command and a data transfer operation instruction; by writing data into the buffer storage block and recycling the buffer storage block when the data transfer operation instruction is completed, the safety of the data written before abnormal power failure recovery of the solid state disk is ensured, and meanwhile, the problems that the user experience is influenced by delayed data reading and uncorrectable Flash reading errors are solved.
Based on the same inventive concept, please refer to fig. 3, further comprising a second obtaining unit 130, wherein the second control unit 140 is in communication connection with the first control unit 120 through the second obtaining unit 130, and the second obtaining unit is configured to obtain an execution completion condition of the data transfer operation instruction on the logical storage block that is not fully written in each storage unit of the solid state disk.
Based on the same inventive concept, the invention provides a storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the abnormal power failure recovery method for the solid state disk is realized.
Based on the same inventive concept, the embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements all or part of the method steps of the above method.
The present invention can implement all or part of the processes of the above methods, and can also be implemented by using a computer program to instruct related hardware, where the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the method.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the computer device and the various interfaces and lines connecting the various parts of the overall computer device.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the computer device by executing or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (e.g., a sound playing function, an image playing function, etc.); the storage data area may store data (e.g., audio data, video data, etc.) created according to the use of the cellular phone. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, server, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), servers and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for recovering abnormal power failure of a solid state disk is characterized by comprising the following steps:
after a host is started and powered on, acquiring the last power failure condition of a solid state disk;
when the solid state disk is abnormally powered down last time, preparing a cache storage block, controlling to execute a data writing command in the cache storage block, and synchronously executing a data transfer operation instruction for transferring data on a logic storage block which is not fully written in each storage unit of the solid state disk;
and when the execution of the data transfer operation instruction is finished, recovering the cache storage block, and controlling the solid state disk to execute a recovery operation instruction for finishing abnormal power failure and reestablishing the logic storage block information.
2. The method for recovering abnormal power failure of a solid state disk according to claim 1, wherein the step of recovering the cache memory block when the execution of the data transfer operation instruction is completed specifically comprises the following steps:
acquiring the execution condition of a data transfer operation instruction on a logic storage block which is not fully written in each storage unit of the solid state disk;
and when the execution of the data transfer operation instruction of the logic storage block is not fully written in each storage unit of the solid state disk, controlling to execute the operation instruction for transferring the data on the cache storage block to the user storage unit.
3. The abnormal power failure recovery method for the solid state disk according to claim 1, wherein after the host is powered on and started up, before the last power failure condition of the solid state disk is obtained, the method further comprises the following steps:
and controlling the solid state disk to execute a hardware initialization operation instruction and a data structure initialization operation instruction.
4. The method for recovering abnormal power failure of a solid state disk according to claim 3, wherein after the step of controlling the solid state disk to execute the hardware initialization operation instruction and the data structure initialization operation instruction, the method further comprises the following steps:
and controlling the solid state disk hardware to execute a PCIe interface initialization operation instruction and an NVME protocol initialization operation instruction.
5. The method for recovering abnormal power failure of a solid state disk according to claim 3, wherein after the operation instructions of hardware initialization and data structure initialization of the solid state disk are executed, the method further comprises the following steps:
controlling the solid state disk to execute an operation instruction for reestablishing the mapping table;
and controlling the solid state disk to execute a recovery task instruction for completing the reestablishment of the mapping table after the abnormal power failure.
6. The method for recovering from abnormal power failure of a solid state disk according to claim 5, wherein the step of controlling the solid state disk to execute the recovery operation instruction for reestablishing the complete mapping table specifically comprises the following steps:
acquiring a physical page address PPA finally written into a mapping data area before the abnormal power failure of the solid state disk;
according to the obtained PPA, obtaining a mapping table which is read from a mapping data area and stored for the last time before the abnormal power failure of the solid state disk occurs, and taking the mapping table as a basic mapping table;
and controlling the solid state disk to execute a recovery operation instruction for sequentially reading the data of the user data area and reestablishing a complete mapping table according to the obtained basic mapping table.
7. The method for recovering abnormal power failure of a solid state disk according to claim 6, wherein the step of obtaining the physical page address PPA which is written into the user data area last before the abnormal power failure of the solid state disk comprises the following steps:
executing scanning operation instructions of all logic storage block states for storing user data, and acquiring all logic storage block states for storing user data;
according to the obtained states of all logic storage blocks storing the user data and the old and new degree of the time stamps, controlling all the logic storage blocks storing the user data to be sequenced from old to new according to the time stamps to obtain a logic storage block queue;
and acquiring a physical page address PPA of the last logical storage block in the logical storage block queue, which is written into the user data area before the abnormal power failure of the solid state disk.
8. A system, comprising:
the first obtaining unit is used for obtaining the last power failure condition of the solid state disk after the host is started and powered on;
the first control unit is in communication connection with the first acquisition unit and is used for controlling to execute a data writing command into a cache storage block and synchronously execute a data transfer operation instruction on a logic storage block which is not fully written in each storage unit of the solid state disk when the solid state disk is abnormally powered down last time;
and the second control unit is in communication connection with the first control unit and is used for recovering the cache storage block when the execution of the data transfer operation instruction of the data transfer on the logic storage block is completed when each storage unit of the solid state disk is not fully written.
9. The system of claim 8, further comprising:
and the second acquisition unit is in communication connection with the first control unit through the second acquisition unit, and is used for acquiring the execution completion condition of the data transfer operation instruction on the logical storage block which is not fully written in each storage unit of the solid state disk.
10. A storage medium, wherein the storage medium stores thereon a computer program, and the computer program, when executed by a processor, implements the method for recovering abnormal power failure of a solid state disk according to any one of claims 1 to 7.
CN202011343921.XA 2020-11-25 2020-11-25 Method and system for recovering abnormal power failure of solid state disk and storage medium Active CN112463656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011343921.XA CN112463656B (en) 2020-11-25 2020-11-25 Method and system for recovering abnormal power failure of solid state disk and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011343921.XA CN112463656B (en) 2020-11-25 2020-11-25 Method and system for recovering abnormal power failure of solid state disk and storage medium

Publications (2)

Publication Number Publication Date
CN112463656A CN112463656A (en) 2021-03-09
CN112463656B true CN112463656B (en) 2022-09-23

Family

ID=74808440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011343921.XA Active CN112463656B (en) 2020-11-25 2020-11-25 Method and system for recovering abnormal power failure of solid state disk and storage medium

Country Status (1)

Country Link
CN (1) CN112463656B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113178212B (en) * 2021-04-29 2023-01-17 枣庄市晓光科技咨询服务有限公司 Hard disk data storage management system
CN113448760B (en) * 2021-06-05 2023-03-10 山东英信计算机技术有限公司 Method, system, equipment and medium for recovering abnormal state of hard disk
CN116909493B (en) * 2023-09-12 2023-11-17 合肥康芯威存储技术有限公司 Memory and control method thereof
CN117632042A (en) * 2024-01-25 2024-03-01 合肥兆芯电子有限公司 Memory management method, memory storage device and memory control circuit unit

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035893A (en) * 2014-06-30 2014-09-10 浪潮(北京)电子信息产业有限公司 Method for data storage during abnormal power down of computer

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9032271B2 (en) * 2012-12-07 2015-05-12 Western Digital Technologies, Inc. System and method for lower page data recovery in a solid state drive
US9946644B2 (en) * 2015-03-25 2018-04-17 SK Hynix Inc. Memory system and operating method thereof
CN108255630A (en) * 2017-11-29 2018-07-06 深圳忆联信息系统有限公司 A kind of method for reducing solid state disk powered-off fault processing time
CN108132890B (en) * 2017-12-20 2021-08-03 北京兆易创新科技股份有限公司 Garbage recycling method, device and equipment for memory chip and storage medium
KR20200113992A (en) * 2019-03-27 2020-10-07 에스케이하이닉스 주식회사 Apparatus and method for reducing cell disturb in open block of the memory system during receovery procedure

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035893A (en) * 2014-06-30 2014-09-10 浪潮(北京)电子信息产业有限公司 Method for data storage during abnormal power down of computer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于NandFLASH高可靠自恢复实时文件系统;张少波等;《计算机工程与科学》;20120615(第06期);全文 *

Also Published As

Publication number Publication date
CN112463656A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN112463656B (en) Method and system for recovering abnormal power failure of solid state disk and storage medium
US8086919B2 (en) Controller having flash memory testing functions, and storage system and testing method thereof
US9582416B2 (en) Data erasing method, memory control circuit unit and memory storage apparatus
CN101640069B (en) Average wear method and average wear system for flash memory
US8131911B2 (en) Data writing method, and flash storage system and controller using the same
US8266371B2 (en) Non-volatile storage device, host device, non-volatile storage system, data recording method, and program
JP2004164633A (en) Method and device for effectively enabling out-of-sequence writing process in nonvolatile memory system
JP2003085034A (en) Nonvolatile storage and data storing method
CN102629206A (en) Embedded system software upgrading method and system
US8667348B2 (en) Data writing method for non-volatile memory module and memory controller and memory storage apparatus using the same
CN107463341A (en) Method for deleting, device and the mobile terminal of FLASH chip
US9552287B2 (en) Data management method, memory controller and embedded memory storage apparatus using the same
CN102955751A (en) Storer storage device, storer controller and data write-in method
CN111444030A (en) Data storage device and method for preventing firmware from failing
JP4829370B1 (en) MEMORY CONTROL DEVICE, MEMORY DEVICE, AND STOP CONTROL METHOD
KR20090055074A (en) Method of transaction-based firmware upgrade in mobile telephone and firmware upgrade system thereof
US7234036B1 (en) Method and apparatus for resolving physical blocks associated with a common logical block
CN102486757B (en) The method of memorizer memory devices and Memory Controller thereof and response host command
US20150046632A1 (en) Memory address management method, memory controller and memory storage device
US20120303879A1 (en) Memory Device and Method for Programming Flash Memory Utilizing Spare Blocks
CN111324289A (en) Memory device
US20200151119A1 (en) Method and apparatus for performing access control between host device and memory device
US9652378B2 (en) Writing method, memory controller and memory storage device
CN112130765A (en) EEPROM data reading and writing method and device
CN102736985B (en) data merging method, controller and storage device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 430000 west of 2-3 / F, No.2 factory building, Guannan Industrial Park, No.1 Gaoxin 2nd Road, Wuhan Donghu New Technology Development Zone, Wuhan City, Hubei Province

Patentee after: Zhiyu Technology Co.,Ltd.

Address before: 430000 west of 2-3 / F, No.2 factory building, Guannan Industrial Park, special No.1, Gaoxin 2nd Road, Donghu New Technology Development Zone, Wuhan City, Hubei Province

Patentee before: EXASCEND TECHNOLOGY (WUHAN) CO.,LTD.