CN115543865A - Power failure protection method and device, readable storage medium and electronic equipment - Google Patents

Power failure protection method and device, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN115543865A
CN115543865A CN202211487922.0A CN202211487922A CN115543865A CN 115543865 A CN115543865 A CN 115543865A CN 202211487922 A CN202211487922 A CN 202211487922A CN 115543865 A CN115543865 A CN 115543865A
Authority
CN
China
Prior art keywords
power
data
segment
read
power failure
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.)
Granted
Application number
CN202211487922.0A
Other languages
Chinese (zh)
Other versions
CN115543865B (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.)
Chengdu Baiwei Storage Technology Co ltd
Original Assignee
Chengdu Baiwei Storage Technology 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 Chengdu Baiwei Storage Technology Co ltd filed Critical Chengdu Baiwei Storage Technology Co ltd
Priority to CN202211487922.0A priority Critical patent/CN115543865B/en
Publication of CN115543865A publication Critical patent/CN115543865A/en
Application granted granted Critical
Publication of CN115543865B publication Critical patent/CN115543865B/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/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • 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/1027Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/16Protection against loss of memory contents
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a power failure protection method, a power failure protection device, a readable storage medium and electronic equipment, which are used for receiving power failure occurrence information; flushing the segmented L2P mapping data in each L2P cache pool into a flash memory according to the power failure occurrence information, and generating a power failure segment table based on the flushed segmented L2P mapping data; the method comprises the steps of receiving a host reading request, wherein the host reading request comprises data to be read, reading the data to be read based on a power-down segment table according to the host reading request, realizing segment power-down protection, knowing which segmented data are not flushed into a flash memory from the power-down segment table, namely which segmented data are not converted into an L2P mapping table, and performing mutual exclusion and recovery based on the power-down segment table after power is on and when the host reading request is received, wherein the host reading request can be responded without waiting for the data in all L2P cache pools to be recovered into the L2P mapping table, so that the time for re-power-on is shortened, the speed for responding to the host reading and writing request is improved, and the compatibility problem caused by long re-power-on is reduced.

Description

Power failure protection method and device, readable storage medium and electronic equipment
Technical Field
The invention relates to the technical field of solid state disks, in particular to a power failure protection method, a power failure protection device, a readable storage medium and electronic equipment.
Background
At present, in mainstream enterprise-level SSD (Solid State drive) firmware development, a capacitor is generally configured on an SSD of a DRAM (Dynamic Random Access Memory) series for power down protection, because a host read-write data and a modified L2P (Logical To Physical, logical block To Physical) mapping data are stored in the DRAM; the cost and the size of the SSD are limited, the matched capacitor is also limited, and how to ensure that all data are not lost in the limited capacitor discharge time and the data can be quickly recovered after being electrified is a problem which needs to be considered by SSD manufacturers.
After a power loss event occurs, firstly, flushing data written by a host into a NAND (flash memory), and flushing mapping data cached in an L2P cache pool into the NAND; the mapping relation between the LAA (logical address) and the PAA (physical address) which are updated according to the request sequence is stored in the L2P cache pool, for example, LAA0, LAA50, LAA2000 and the like are stored in sequence according to the request sequence; the L2P cache table stores the mapping relationship between the LAA and the PAA stored according to the address relationship, for example, LAA0, LAA1, LAA2, etc. are stored in sequence according to the address order; since the amount of the L2P cache table is large, if the addresses of 4Bytes are stored according to the mapping granularity of 4k, the 1T data space needs 1G of the L2P cache table, so that it cannot be guaranteed that all data in the L2P cache table is updated to the NAND when the power lost occurs.
The current mainstream scheme is as follows: as shown in fig. 4 and 5, the L2P cache table performs periodic NAND flushing in the background, for example, triggering with a fixed duration or a fixed write amount; after power lost occurs, the incremental data in the L2P cache pool is flushed into the NAND, after the L2P is completely updated once, a consistent checkpoint (an internal event) similar to a database is formed, and subsequent incremental updating can be recovered through the L2P cache pool.
The solution has a serious problem that if the data stored in the L2P cache pool is more, all the data in the load L2P cache pool needs to be updated to the L2P cache table in the power-on process, so as to execute the read-write request issued by the host, which may cause the problem of too long power-on time or slow response of the host request.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the power failure protection method, the power failure protection device, the readable storage medium and the electronic equipment are capable of reducing the time length of power re-electrification and improving the speed of responding to a read-write request of a host.
In order to solve the technical problems, the invention adopts a technical scheme that:
a power-down protection method comprises the following steps:
receiving power failure occurrence information;
flushing segmented L2P mapping data in each L2P cache pool into a flash memory according to the power failure occurrence information, and generating a power failure segment table based on the flushed segmented L2P mapping data;
receiving a host reading request, wherein the host reading request comprises data to be read, and reading the data to be read based on the power-down segment table according to the host reading request.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a power down protection device comprising:
the information acquisition module is used for receiving power failure occurrence information;
the data processing module is used for flushing the segmented L2P mapping data in each L2P cache pool into a flash memory according to the power failure occurrence information and generating a power failure segment table based on the flushed segmented L2P mapping data;
and the data reading module is used for receiving a host reading request, wherein the host reading request comprises data to be read, and the data to be read is read based on the power-down segment table according to the host reading request.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of a power down protection method as described above.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of a power down protection method as described above when executing the computer program.
The invention has the beneficial effects that: the method comprises the steps of flushing segmented L2P mapping data in each L2P cache pool into a flash memory according to power failure occurrence information, generating a power failure segment table based on the flushed segmented L2P mapping data, reading data to be read based on the power failure segment table according to a host reading request, achieving segmented power failure protection, knowing which segmented data are not flushed into the flash memory from the power failure segment table, namely, which segmented data are not converted into an L2P mapping table, performing mutual exclusion and recovery based on the power failure segment table after power-on and when the host reading request is received, and responding to the host reading request without waiting for the data in all the L2P cache pools to be recovered into the L2P mapping table, so that the time for power-on is shortened, the speed for responding to the host reading request is increased, and the compatibility problem caused by overlong power-on is reduced.
Drawings
Fig. 1 is a flowchart illustrating steps of a power down protection method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a power down protection apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating data protection in the event of a power failure in the prior art;
FIG. 5 is a diagram illustrating data recovery during power-up in the prior art;
fig. 6 is a schematic diagram of data protection in power failure in the power failure protection method according to the embodiment of the present invention;
fig. 7 is a schematic diagram of data recovery at power up in the power failure protection method according to the embodiment of the present invention.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1, an embodiment of the present invention provides a power failure protection method, including:
receiving power failure occurrence information;
flushing the segmented L2P mapping data in each L2P cache pool into a flash memory according to the power failure occurrence information, and generating a power failure segment table based on the flushed segmented L2P mapping data;
receiving a host reading request, wherein the host reading request comprises data to be read, and reading the data to be read based on the power-down segment table according to the host reading request.
From the above description, the beneficial effects of the present invention are: the method comprises the steps of flushing segmented L2P mapping data in each L2P cache pool into a flash memory according to power failure occurrence information, generating a power failure segment table based on the flushed segmented L2P mapping data, reading data to be read based on the power failure segment table according to a host reading request, achieving segmented power failure protection, knowing which segmented data are not flushed into the flash memory from the power failure segment table, namely, which segmented data are not converted into an L2P mapping table, performing mutual exclusion and recovery based on the power failure segment table after power-on and when the host reading request is received, and responding to the host reading request without waiting for the data in all the L2P cache pools to be recovered into the L2P mapping table, so that the time for power-on is shortened, the speed for responding to the host reading request is increased, and the compatibility problem caused by overlong power-on is reduced.
Further, the step of flushing the segmented L2P mapping data in each L2P cache pool to the flash memory according to the received power failure occurrence information includes:
acquiring L2P mapping data;
segmenting the L2P mapping data according to a preset length to obtain a plurality of segmented L2P mapping data;
and storing each segmented L2P mapping data to a corresponding L2P cache pool.
As can be seen from the above description, the L2P mapping data is segmented according to the preset length, and each segmented L2P mapping data is stored in the corresponding L2P cache pool, so as to facilitate the subsequent implementation of the segmented power failure protection.
Further, the receiving a host read request, where the host read request includes data to be read, and the reading the data to be read based on the power-down segment table according to the host read request includes:
judging whether power-on occurrence information is received or not;
if so, determining power failure protection information corresponding to each segment based on the power failure segment table according to the power-on occurrence information;
and judging whether a host reading request is received, wherein the host reading request comprises data to be read, and if so, reading the data to be read based on the power-down protection information corresponding to each segment according to the host reading request.
As can be seen from the above description, the power-down protection information indicates whether data in the corresponding segment has not been converted into the L2P mapping table, and when a host read request is subsequently received, whether data is directly read from the L2P mapping table can be determined according to the power-down protection information, so that the response speed of the host read request is increased.
Further, the generating a power-down segment table based on the flushed-in segment L2P mapping data includes:
determining a physical address, a segment identifier and a brushing timestamp corresponding to each flushed segment of L2P mapping data;
and generating a power-down segment table according to the physical address, the segment identifier and the brushing timestamp.
As can be seen from the above description, the power-down segment table is generated according to the physical address, the segment identifier, and the flush timestamp, and it can be known through the power-down segment table which data of which segments have been flushed to the flash memory, that is, which data have been converted into the L2P mapping table, so that the method for determining the subsequent response read request based on the power-down segment table is facilitated.
Further, the determining power down protection information corresponding to each segment based on the power down segment table according to the power up occurrence information includes:
and traversing each segment according to the power-on occurrence information, judging whether the traversed segment exists in the power-down segment table or not according to the physical address, the segment identifier and the brushing timestamp for the traversed segment, if so, determining the power-down protection information corresponding to the traversed segment to be a first preset value, and otherwise, determining the power-down protection information corresponding to the traversed segment to be a second preset value.
According to the description, which data is not recovered can be accurately and effectively known according to the physical address, the segment identifier and the brushing timestamp, so that the time length for powering on again after power failure is reduced.
Further, the reading the data to be read based on the power down protection information corresponding to each segment according to the host read request includes:
determining a target segment corresponding to the data to be read according to the host read request;
determining target power failure protection information corresponding to the target segment from the power failure protection information corresponding to each segment;
and judging whether the target power-down protection information is a first preset value, if so, directly reading the data to be read from an L2P cache table corresponding to the L2P cache pool, otherwise, loading the segmented L2P mapping data in the target segment to the L2P cache table corresponding to the L2P cache pool, and reading the data to be read from the L2P cache table.
As can be seen from the above description, when the target power-down protection information is the first preset value, it indicates that all data in the segment are restored to the L2P cache table corresponding to the L2P cache pool, and the data to be read can be directly read from the L2P cache table, otherwise, it is considered that part of the data in the segment is not restored to the L2P cache table corresponding to the L2P cache pool, the L2P mapping data in the segment needs to be loaded to the L2P cache table, and then the data is read from the L2P cache table, so as to respond to the read request of the host in time, and improve the response efficiency.
Further, the first preset value is 0.
Referring to fig. 2, another embodiment of the present invention provides a power down protection device, including:
the information acquisition module is used for receiving power failure occurrence information;
the data processing module is used for flushing the segmented L2P mapping data in each L2P cache pool into a flash memory according to the power failure occurrence information and generating a power failure segment table based on the flushed segmented L2P mapping data;
and the data reading module is used for receiving a host reading request, wherein the host reading request comprises data to be read, and the data to be read is read based on the power-down segment table according to the host reading request.
Another embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of a power fail safeguard method as described above.
Referring to fig. 3, another embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the power failure protection method.
The power failure protection method, the power failure protection device, the readable storage medium and the electronic device of the present invention can be applied to an SSD, and the following description is given by specific embodiments:
example one
Referring to fig. 1, fig. 6 and fig. 7, a power down protection method of the present embodiment includes the steps of:
s1, acquiring L2P mapping data;
s2, segmenting the L2P mapping data according to a preset length to obtain a plurality of segmented L2P mapping data;
the preset length can be set according to actual conditions;
in an optional implementation manner, the preset length is 16G, the L2P mapping data is segmented according to 16G to obtain a plurality of segmented L2P mapping data, and the range of 1T may be divided into 64 segments (segments).
And S3, storing each piece of L2P mapping data into a corresponding L2P cache pool, namely, each piece corresponds to the respective L2P cache pool.
S4, receiving power failure (power lost) occurrence information;
s5, according to the power failure occurrence information, flushing the segmented L2P mapping data in each L2P cache pool into a flash memory, and generating a power failure segment table based on the flushed segmented L2P mapping data, as shown in FIG. 6, specifically comprising:
and S51, flushing the segmented L2P mapping data in each L2P cache pool into a flash memory (NAND) according to the power failure occurrence information.
S52, determining a physical address (PAA), a segment identifier (segment id) and a brushing timestamp corresponding to each flushed segment L2P mapping data;
and S53, generating a segment table (segment table) according to the physical address, the segment identifier and the brushing timestamp.
Specifically, the physical address, the segment identifier, and the brushing timestamp are saved in a segment table.
S6, receiving a host read request, where the host read request includes data to be read, and reading the data to be read based on the power-down segment table according to the host read request, as shown in fig. 7, specifically including:
s61, judging whether power on occurrence information is received or not;
s611, if yes, determining power failure protection information corresponding to each segment based on the power failure segment table according to the power-on occurrence information;
specifically, each segment is traversed according to the power-on occurrence information, and whether the traversed segment exists in the power-down segment table or not is judged according to the physical address, the segment identifier and the brushing timestamp for the traversed segment, if so, power-down protection information (segment dirty bit map) corresponding to the traversed segment is determined to be a first preset value, and otherwise, the power-down protection information corresponding to the traversed segment is determined to be a second preset value.
Wherein the first preset value is 0, and the second preset value is 1.
For example, if the segment id of a segment is in the segment table, and PAAs of all segment L2P mapping data of the segment are in the segment table, the segment dirty bitmap corresponding to the segment is determined to be 1, otherwise, the segment dirty bitmap is determined to be 0.
S612, if not, returning to S61;
s62, judging whether a host reading request is received or not, wherein the host reading request comprises data to be read;
s621, if yes, reading the data to be read based on the power down protection information corresponding to each segment according to the host read request, including:
s6211, determining a target segment corresponding to the data to be read according to the host read request;
the data to be read is a logic address (LAA) corresponding to the data to be read;
specifically, the target segment corresponding to the data to be read is determined according to the logical address corresponding to the data to be read.
S6212, determining target power failure protection information corresponding to the target segment from the power failure protection information corresponding to each segment;
for example, all segment dirty bitmap is 00011100011001, if the target segment is segment 2, the corresponding target power-down protection information is 0, which indicates that the latest L2P mapping data is already in the L2P cache table, and the L2P cache table can be directly read, and if the target segment is segment 4, the corresponding target power-down protection information is 1, which indicates that the L2P mapping data is still in the L2P cache pool, and the data in the segment corresponding to the load can be directly loaded into the L2P cache table.
S6213, judging whether the target power-down protection information is a first preset value, if so, directly reading the data to be read from an L2P cache table corresponding to the L2P cache pool, and if not, loading the segmented L2P mapping data in the target segment to the L2P cache table corresponding to the L2P cache pool, and reading the data to be read from the L2P cache table.
And S622, if not, returning to S62.
Example two
Referring to fig. 2, a power down protection device of the present embodiment includes:
the information acquisition module is used for receiving power failure occurrence information;
the data processing module is used for flushing the segmented L2P mapping data in each L2P cache pool into a flash memory according to the power failure occurrence information and generating a power failure segment table based on the flushed segmented L2P mapping data;
and the data reading module is used for receiving a host reading request, wherein the host reading request comprises data to be read, and the data to be read is read based on the power-down segment table according to the host reading request.
EXAMPLE III
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, is adapted to carry out the steps of the power fail safeguard method according to one embodiment.
Example four
Referring to fig. 3, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the power down protection method in the first embodiment.
In summary, the power failure protection method, device, readable storage medium and electronic device provided by the present invention receive power failure occurrence information; flushing the segmented L2P mapping data in each L2P cache pool into a flash memory according to the power failure occurrence information, and generating a power failure segment table based on the flushed segmented L2P mapping data; receiving a host reading request, wherein the host reading request comprises data to be read, and reading the data to be read based on the power-down segment table according to the host reading request; before the flash memory is flushed, acquiring L2P mapping data; segmenting the L2P mapping data according to a preset length to obtain a plurality of segmented L2P mapping data; and after power is on and a host read request is received, mutual exclusion and recovery can be carried out on the basis of the power-off segment table, and the host read request can be responded without waiting for the data in all the L2P cache pools to be recovered to the L2P mapping table, so that the time for powering on again is shortened, the speed for responding to the host read-write request is improved, and the compatibility problem caused by long time for powering on again is reduced.
In the above embodiments provided in the present application, it should be understood that the disclosed method, apparatus, computer-readable storage medium, and electronic device may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of components or modules may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be an indirect coupling or communication connection through some interfaces, devices or components or modules, and may be in an electrical, mechanical or other form.
The components described as separate parts may or may not be physically separate, and parts displayed as components may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the components can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each component may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (10)

1. A power failure protection method is characterized by comprising the following steps:
receiving power failure occurrence information;
flushing the segmented L2P mapping data in each L2P cache pool into a flash memory according to the power failure occurrence information, and generating a power failure segment table based on the flushed segmented L2P mapping data;
receiving a host reading request, wherein the host reading request comprises data to be read, and reading the data to be read based on the power-down segment table according to the host reading request.
2. The method of claim 1, wherein the step of flushing the segmented L2P mapping data in each L2P cache pool to the flash memory according to the received power failure occurrence information comprises the steps of:
acquiring L2P mapping data;
segmenting the L2P mapping data according to a preset length to obtain a plurality of segmented L2P mapping data;
and storing each segmented L2P mapping data to a corresponding L2P cache pool.
3. The method of claim 1, wherein the receiving a host read request, the host read request including data to be read, and the reading the data to be read based on the power-down segment table according to the host read request comprises:
judging whether power-on occurrence information is received or not;
if so, determining power failure protection information corresponding to each segment based on the power failure segment table according to the power-on occurrence information;
and judging whether a host reading request is received, wherein the host reading request comprises data to be read, and if so, reading the data to be read based on the power-down protection information corresponding to each segment according to the host reading request.
4. The method of claim 3, wherein the generating a power-down segment table based on the flushed segmented L2P mapping data comprises:
determining a physical address, a segment identifier and a brushing timestamp corresponding to each flushed segment of L2P mapping data;
and generating a power-down segment table according to the physical address, the segment identifier and the brushing timestamp.
5. The method of claim 4, wherein the determining the power down protection information corresponding to each segment based on the power down segment table according to the power up occurrence information comprises:
traversing each segment according to the power-on occurrence information, judging whether the traversed segment exists in the power-off segment table or not according to the physical address, the segment identifier and the brushing timestamp for the traversed segment, if so, determining the power-off protection information corresponding to the traversed segment as a first preset value, otherwise, determining the power-off protection information corresponding to the traversed segment as a second preset value.
6. The method according to claim 3, wherein the reading the data to be read based on the power fail safe information corresponding to each segment according to the host read request comprises:
determining a target segment corresponding to the data to be read according to the host read request;
determining target power failure protection information corresponding to the target segment from the power failure protection information corresponding to each segment;
and judging whether the target power-down protection information is a first preset value, if so, directly reading the data to be read from an L2P cache table corresponding to the L2P cache pool, otherwise, loading the segmented L2P mapping data in the target segment to the L2P cache table corresponding to the L2P cache pool, and reading the data to be read from the L2P cache table.
7. The power-down protection method according to claim 6, wherein the first preset value is 0.
8. A power down protection device, comprising:
the information acquisition module is used for receiving power failure occurrence information;
the data processing module is used for flushing the segmented L2P mapping data in each L2P cache pool into a flash memory according to the power failure occurrence information and generating a power failure segment table based on the flushed segmented L2P mapping data;
and the data reading module is used for receiving a host reading request, wherein the host reading request comprises data to be read, and the data to be read is read based on the power-down segment table according to the host reading request.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of a method for power down protection according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of a power down protection method as claimed in any one of claims 1 to 7 when executing the computer program.
CN202211487922.0A 2022-11-25 2022-11-25 Power failure protection method and device, readable storage medium and electronic equipment Active CN115543865B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211487922.0A CN115543865B (en) 2022-11-25 2022-11-25 Power failure protection method and device, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211487922.0A CN115543865B (en) 2022-11-25 2022-11-25 Power failure protection method and device, readable storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115543865A true CN115543865A (en) 2022-12-30
CN115543865B CN115543865B (en) 2023-04-11

Family

ID=84722096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211487922.0A Active CN115543865B (en) 2022-11-25 2022-11-25 Power failure protection method and device, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115543865B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117149091A (en) * 2023-10-23 2023-12-01 四川云海芯科微电子科技有限公司 Solid state disk data storage method and related device

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW531698B (en) * 2001-08-31 2003-05-11 Key Technology Corp Rapid and abnormal power shutdown prevention algorithm for flash memory
CN1447243A (en) * 2002-03-25 2003-10-08 太和科技股份有限公司 Calculation method executed in quick flash memory fast and not caused abnormal power breakdown as well as its control system
CN102043721A (en) * 2010-05-12 2011-05-04 中颖电子股份有限公司 Memory management method for flash memory
CN103425605A (en) * 2013-07-26 2013-12-04 记忆科技(深圳)有限公司 Solid-state disk power failure protection and quick start method and system
CN103996412A (en) * 2013-02-19 2014-08-20 北京同方微电子有限公司 Power-fail protection method applied to intelligent-card nonvolatile memories
CN104967807A (en) * 2014-12-30 2015-10-07 浙江大华技术股份有限公司 Caching method and apparatus
CN107003942A (en) * 2014-10-27 2017-08-01 桑迪士克科技有限责任公司 To for strengthening the performance of storage device and the processing of persistent unmapped order
CN110825325A (en) * 2019-10-30 2020-02-21 深圳忆联信息系统有限公司 Mapping table dynamic loading-based SSD performance improving method and device, computer equipment and storage medium
US20200089619A1 (en) * 2018-09-14 2020-03-19 Silicon Motion, Inc. Data storage device and method of deleting namespace thereof
CN110908926A (en) * 2018-09-14 2020-03-24 慧荣科技股份有限公司 Data storage device and writing method of logical-to-physical address mapping table
CN111984441A (en) * 2019-05-21 2020-11-24 慧荣科技股份有限公司 Instantaneous power failure recovery processing method and device and computer readable storage medium
CN112631950A (en) * 2020-12-11 2021-04-09 苏州浪潮智能科技有限公司 L2P table saving method, system, device and medium
CN113590505A (en) * 2021-06-30 2021-11-02 深圳大普微电子科技有限公司 Address mapping method, solid state disk controller and solid state disk
CN114036079A (en) * 2021-09-07 2022-02-11 联芸科技(杭州)有限公司 Mapping table compression method and system, memory controller, solid state disk and data reading method

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW531698B (en) * 2001-08-31 2003-05-11 Key Technology Corp Rapid and abnormal power shutdown prevention algorithm for flash memory
CN1447243A (en) * 2002-03-25 2003-10-08 太和科技股份有限公司 Calculation method executed in quick flash memory fast and not caused abnormal power breakdown as well as its control system
CN102043721A (en) * 2010-05-12 2011-05-04 中颖电子股份有限公司 Memory management method for flash memory
CN103996412A (en) * 2013-02-19 2014-08-20 北京同方微电子有限公司 Power-fail protection method applied to intelligent-card nonvolatile memories
CN103425605A (en) * 2013-07-26 2013-12-04 记忆科技(深圳)有限公司 Solid-state disk power failure protection and quick start method and system
CN107003942A (en) * 2014-10-27 2017-08-01 桑迪士克科技有限责任公司 To for strengthening the performance of storage device and the processing of persistent unmapped order
CN104967807A (en) * 2014-12-30 2015-10-07 浙江大华技术股份有限公司 Caching method and apparatus
US20200089619A1 (en) * 2018-09-14 2020-03-19 Silicon Motion, Inc. Data storage device and method of deleting namespace thereof
CN110908926A (en) * 2018-09-14 2020-03-24 慧荣科技股份有限公司 Data storage device and writing method of logical-to-physical address mapping table
CN111984441A (en) * 2019-05-21 2020-11-24 慧荣科技股份有限公司 Instantaneous power failure recovery processing method and device and computer readable storage medium
CN110825325A (en) * 2019-10-30 2020-02-21 深圳忆联信息系统有限公司 Mapping table dynamic loading-based SSD performance improving method and device, computer equipment and storage medium
CN112631950A (en) * 2020-12-11 2021-04-09 苏州浪潮智能科技有限公司 L2P table saving method, system, device and medium
CN113590505A (en) * 2021-06-30 2021-11-02 深圳大普微电子科技有限公司 Address mapping method, solid state disk controller and solid state disk
CN114036079A (en) * 2021-09-07 2022-02-11 联芸科技(杭州)有限公司 Mapping table compression method and system, memory controller, solid state disk and data reading method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴庆民: "大数据环境下数据容错技术研究与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117149091A (en) * 2023-10-23 2023-12-01 四川云海芯科微电子科技有限公司 Solid state disk data storage method and related device

Also Published As

Publication number Publication date
CN115543865B (en) 2023-04-11

Similar Documents

Publication Publication Date Title
US10255192B2 (en) Data storage device and data maintenance method thereof
US11243709B2 (en) Data storage apparatus and operating method thereof
US8694984B2 (en) Memory apparatus and method of updating firmware of the memory apparatus
CN105718530B (en) File storage system and file storage control method thereof
TWI542991B (en) Drive assisted system checkpointing
KR101862112B1 (en) Accelerating boot time zeroing of memory based on non-volatile memory (nvm) technology
CN108431783B (en) Access request processing method and device and computer system
TWI596541B (en) Data accessing system, data accessing appraratus and method for accessing data
CN107632943B (en) Solid state disk data protection method and solid state disk
CN112379830B (en) Method and device for creating effective data bitmap, storage medium and electronic equipment
CN105677511B (en) A kind of method for writing data and device reducing synchronization overhead
CN115543865B (en) Power failure protection method and device, readable storage medium and electronic equipment
CN104516959A (en) Method and device for managing database logs
US20220188037A1 (en) Information Writing Method and Apparatus
CN105608013A (en) MRAM-integrated memory card control chip and memory card
JP6717894B2 (en) Method for performing refresh management in a memory device, associated memory device and its controller
CN111324549A (en) Memory and control method and device thereof
CN117370222A (en) Storage mapping method, storage mapping device, computer readable storage medium and electronic equipment
CN111124294B (en) Sector mapping information management method and device, storage medium and equipment
CN113342276A (en) Log saving method, system, device and medium
CN115878033B (en) Solid state disk and mapping table management method thereof
CN112905496A (en) Garbage recycling method and device, readable storage medium and electronic equipment
CN113778911B (en) L2P data caching method and device, readable storage medium and electronic equipment
CN114328548B (en) Dual-storage-pool data elimination speed control method, system, terminal and storage medium
CN109960611B (en) Data recovery method and device, electronic equipment and machine-readable storage medium

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