CN108804033B - Full-disk scanning method and device based on power-off continuation, computer equipment and medium - Google Patents
Full-disk scanning method and device based on power-off continuation, computer equipment and medium Download PDFInfo
- Publication number
- CN108804033B CN108804033B CN201810480025.4A CN201810480025A CN108804033B CN 108804033 B CN108804033 B CN 108804033B CN 201810480025 A CN201810480025 A CN 201810480025A CN 108804033 B CN108804033 B CN 108804033B
- Authority
- CN
- China
- Prior art keywords
- user data
- mapping table
- scanning
- power
- full
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0667—Virtualisation aspects at data level, e.g. file, record or object virtualisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Abstract
The invention relates to a method, a device, computer equipment and a medium for full-disk scanning based on power failure continuation, wherein the method comprises the steps of judging whether a current mapping table is complete or not; if not, clearing useless mapping table information, and taking the position of the most initial user data as an initial position; if so, acquiring a user data position scanned before power failure according to the mapping table information to serve as an initial position; scanning the user data in sequence, and storing mapping table information and position information of the currently scanned user data in NAND Flash; judging whether all the user data are scanned completely; if yes, outputting a notification of successful restoration of the mapping table; if not, returning to the step of scanning the user data in sequence from the initial position and storing the mapping table information in the NAND Flash. The invention can still recover the mapping table after the power failure restart, reduces the influence of the power failure on the recovery of the mapping table and improves the efficiency of full-disk scanning.
Description
Technical Field
The present invention relates to a memory, and more particularly, to a method and apparatus for full disk scanning based on power-off resume, a computer device, and a storage medium.
Background
The full-disk scanning algorithm based on power failure continuation refers to a process of scanning and recovering mapping table information according to user data in a writing sequence when the mapping table information from a logical address to a physical address is lost. The full-disk scanning based on power-off resuming is performed according to the writing sequence of user data, the writing sequence of the user data among different erasing units has special fields for recording, and the writing sequence inside the erasing units is fixed. And after the erasing units are sequenced according to the writing sequence, the erasing unit which is written with data firstly is taken out. The data on the erasing unit is read out sequentially according to the sequence of the reading and writing units, and the content read out by each reading and writing unit has a special area for recording the information of the logical address written in the physical address.
As shown in fig. 1, an area for recording a logical address in the read/write unit information is referred to as a meta area, the meta area is a part of a spare area of the read/write unit in the NAND flash, and the FTL module stores the logical address corresponding to the physical address by using the meta area. During the process of writing user data, when data of a logical address lpa0 starts, the data are written at the position of a physical address ppa0, and then are rewritten at the position of ppa1, in the process of recovering a mapping table, as shown in fig. 2, first the logical address 0 is read to the lpa0, at this time, the mapping relationship between the logical address and the physical address is (lpa0, ppa0), after the scanning is continued, the logical address 1 is also read to the lpa0, at this time, the mapping relationship between the logical address and the physical address is updated to (lpa0, ppa1), if all erasing units storing user data are scanned once, and the lpa0 is not read to the meta area of other reading and writing units of the NAND Flash, it is stated that the logical address lpa0 is mapped to the position of the physical address ppa1, the data expected by the user can be read at the position of ppa1, and similarly, other logical addresses are also found by the same storage method.
As shown in fig. 3, the starting point of the full-disk scanning user data based on power failure continuation is the erasing unit 20, other user data are sequentially scanned, the currently recovered mapping table is stored in the NAND Flash when the scanning reaches a certain data amount, and then the scanning is continued until all the user data are scanned, at this time, the mapping table stored in the NAND is the recovered mapping table.
The current full-disk scanning algorithm based on power failure continuation can achieve the purpose of recovering the mapping table, but the power failure cannot be maintained in the process of recovering the mapping table based on the full-disk scanning of the power failure continuation. When the capacity of the TF card is larger, the time for recovering the mapping table based on the full-disk scanning of the outage continuation is longer, if the outage occurs in the process of the full-disk scanning based on the outage continuation, all the information recovered before is completely invalidated, when the system is electrified again, the system needs to restart, namely all the user data is scanned again, in addition, the data may need to be read and written continuously in the using process of the TF card, however, the reading and writing operations cannot be responded because the mapping table information is not recovered in the process of the full-disk scanning based on the outage continuation, the reading and writing operations are continuously carried out in the process of the full-disk scanning based on the outage continuation, the reading and writing operations are overtime, the host considers that the TF card is abnormal, the host initiatively initiates the outage restart operation, the outage restart operation can cause the smooth ending of the full-disk scanning based on the outage continuation, and the power-up is carried out again and the full-disk scanning based on the outage continuation, As described above, the same process is repeated every time the TF card is powered on, and the TF card does not obtain enough time to complete the recovery of the mapping table, and thus the TF card cannot work normally.
Therefore, it is necessary to design a new full-disk scanning method based on power-off restart, so that the system can still recover the mapping table after the power-off restart, the influence of the power-off on the recovery of the mapping table is reduced, and the full-disk scanning efficiency is improved.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a full disk scanning method and device based on power-off resumption, a computer device and a storage medium.
In order to achieve the purpose, the invention adopts the following technical scheme: a full disk scanning method based on power-down resume, the method comprising:
judging whether the current mapping table is complete;
if not, clearing useless mapping table information, and taking the position of the most initial user data as an initial position;
if so, acquiring a user data position scanned before power failure according to the mapping table information to serve as an initial position;
scanning the user data in sequence, and storing mapping table information and position information of the currently scanned user data in NAND Flash;
judging whether all the user data are scanned completely;
if yes, outputting a notification of successful restoration of the mapping table;
if not, returning to the step of scanning the user data in sequence from the initial position and storing mapping table information in the NAND Flash;
the position information of the user data comprises a channel where the user data is located, a chip selection where the user data is located, an erasing unit where the user data is located and a reading and writing unit where the user data belongs.
The further technical scheme is as follows: before the step of judging whether the current mapping table is complete, the method further comprises the following steps:
judging whether the state of full-disk scanning based on power-off continuity before power-off is that user data is not scanned;
if not, entering a step of judging whether the current mapping table is complete;
if yes, the step of clearing useless mapping table information is carried out.
The further technical scheme is as follows: the method further comprises the following steps:
when the user data are scanned in sequence and the mapping table information and the position information of the currently scanned user data are stored in the NAND Flash, the computer is started and restarted when the power failure phenomenon occurs, and the computer enters a step of judging whether the state of the full-disk scanning based on the power failure continuation before the power failure is the user data scanning which is not started or not.
The invention also provides a full-disk scanning device based on power failure continuation, which comprises an integrity judgment unit, an emptying unit, a position acquisition unit, a scanning storage unit, a scanning judgment unit and a notification unit;
the integrity judging unit is used for judging whether the current mapping table is complete or not;
the clearing unit is used for clearing useless mapping table information if the user data is not the initial user data, and taking the position of the initial user data as an initial position;
the position acquisition unit is used for acquiring a user data position scanned before power failure according to mapping table information as an initial position if the position acquisition unit is used for acquiring the user data position scanned before power failure according to the mapping table information;
the scanning storage unit is used for scanning the user data in sequence and storing mapping table information and position information of the currently scanned user data in the NAND Flash;
the scanning judgment unit is used for judging whether all the user data are scanned completely;
the notification unit is used for outputting a notification that the mapping table is successfully recovered if the mapping table is successfully recovered;
the position information of the user data comprises a channel where the user data is located, a chip selection where the user data is located, an erasing unit where the user data is located and a reading and writing unit where the user data is located.
The further technical scheme is as follows: the device also comprises a state judgment unit;
and the state judgment unit is used for judging whether the state of full disk scanning based on power-off resumption before power-off is that user data is not started to be scanned.
The further technical scheme is as follows: the device also comprises a power-off processing unit which is used for starting and restarting when the power-off phenomenon occurs.
The invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the full-disk scanning method based on power-off resumption.
The present invention also provides a medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the above-described full disk scanning method based on power-down resume.
Compared with the prior art, the invention has the beneficial effects that: the invention relates to a full-disk scanning method based on outage continuation, which records the position of user data in NAND Flash besides storing mapping table information when scanning the user data, starts scanning from the position of the recorded user data when the outage occurs if the mapping table information is complete, and starts scanning from the position of the sequenced user data when the mapping table information is incomplete, wherein the position of the user data in the scanning process needs to be recorded no matter which position the user data in the scanning process starts scanning, so that the resumption of the outage scanning process next time is facilitated, the system can still recover the mapping table after the outage is restarted, the influence of the outage on the restoration of the mapping table is reduced, and the full-disk scanning efficiency is improved.
The invention is further described below with reference to the accompanying drawings and specific embodiments.
Drawings
FIG. 1 is a diagram of a prior art read/write unit information distribution;
FIG. 2 is a flow chart of prior art map information recovery;
FIG. 3 is a flow chart of a prior art full disk scan based on power-down resume;
FIG. 4 is a flowchart of a full disk scanning method based on power-down resume according to an embodiment of the present invention;
FIG. 5 is a block diagram of a full-disc scanner based on power-down resume according to an embodiment of the present invention;
fig. 6 is a block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to more fully understand the technical content of the present invention, the technical solution of the present invention will be further described and illustrated with reference to the following specific embodiments, but not limited thereto.
As shown in fig. 4 to 6, the full-disk scanning method based on power-off resume provided in this embodiment can be applied to recover mapping table information in a power-off process, so that after the power-off resume, the system can still recover the mapping table, thereby reducing the influence of the power-off on the recovery of the mapping table and improving the efficiency of full-disk scanning.
As shown in fig. 4, the present embodiment provides a full-disk scanning method based on power-off resume, where the method includes:
s2, judging whether the current mapping table is complete;
specifically, the information of the mapping table is judged to be damaged, and when the mapping table is intercepted midway due to a power failure phenomenon in the recovery process, the mapping table is considered to be incomplete.
In this embodiment, there is a special field in the system to indicate whether the process of writing the mapping table information to NAND FLASH is finished, a field of 0 indicates that the mapping table is not completely written and the power is off, the current mapping table is incomplete, and if this field is set to 1, it indicates that the current mapping table is complete.
S3, if not, clearing useless mapping table information, and taking the position of the most initial user data as the initial position;
after finding that the mapping table information stored on the NAND Flash is damaged, triggering full-disk scanning based on power failure continuation to recover the mapping table information at the moment, firstly clearing useless mapping table information from the NAND Flash, and then scanning erasing units storing user information one by one according to a data writing sequence, so that the influence of the useless mapping table information on the storage of the intact mapping table information is avoided, and the useless mapping table information is cleared.
S4, if yes, acquiring the scanned user data position before power failure as an initial position according to the mapping table information;
when the mapping table information is not incomplete or damaged, the last user data position scanned before power failure is obtained, scanning is started from the position, scanning does not need to be started from all user data, and the influence of power failure on the mapping table recovery process is reduced.
S5, scanning the user data in sequence, and storing mapping table information and the position information of the currently scanned user data in NAND Flash;
in this embodiment, the location information of the user data includes a channel where the user data is located, a chip select where the user data is located, an erasing unit where the user data is located, and a reading/writing unit where the user data is located.
In particular, user data is scanned in order from a starting position.
When a certain amount of user data is scanned (for example, 4092 logical mapping addresses with the maximum capacity are reached), writing the currently recovered mapping table information into the NAND Flash, recording the position information of the currently scanned user data into the NAND Flash while writing the mapping table information, if power failure occurs later, restarting the full-disk scanning recovery mapping table based on power failure resumption, wherein the starting point of the full-disk scanning based on power failure resumption is not the initial position of the user data writing, but the position of the position information recording, thereby reducing the time repeatedly consumed by the full-disk scanning based on power failure resumption due to power failure restart.
In the original full-disk scanning algorithm based on power-off resumption, the scanning starting point is the erasing unit 20, after power-off resumption in the full-disk scanning process based on power-off resumption, the scanning starting point in the original technology is the erasing unit 20, in the embodiment, the starting point of the first scanning is the erasing unit 20, after a certain data amount is scanned, mapping table information is stored in the NAND Flash, at this time, user data is scanned to the position of ppa2, and the position information of ppa2 is also recorded in the NAND Flash. If power is removed after ppa2 is recorded and before the next mapping table store has not been triggered, the starting point for scanning at restart is ppa 2.
S6, judging whether all the user data are scanned completely;
and scanning all the user data by adopting the scanning step of the step S5 until all the user data are scanned, and completing the recovery of all mapping tables.
S7, if yes, outputting a notification that the mapping table is successfully recovered; if not, the process returns to step S5.
Preferably, in this embodiment, before the step of determining whether the current mapping table is complete in the step of S2, the method further includes:
s1, judging whether the state of the full disk scanning based on the power-off resuming before the power-off is that the user data is not started to be scanned;
if not, the step S2 is entered;
if yes, the process proceeds to step S3.
Specifically, there is a special field for recording a change of the full disk scan state based on power-off resume, and the user data not started to be scanned and the user data already started to be scanned are two different states, and this state change is recorded in the NOR flash.
In addition, in this embodiment, the method further includes:
when the step of S5 is performed, the user data are scanned in sequence, and the mapping table information and the position information of the currently scanned user data are stored in the NAND Flash, the computer is started and restarted when the power failure phenomenon occurs, and the step of S1 is performed.
The state of the full-disk scanning based on the power-off resumption is recorded into the NOR Flash in the process of the full-disk scanning based on the power-off resumption, and the state before the power-off is checked after the power-off resumption to confirm the flow of the full-disk scanning based on the power-off resumption in the new restarting process. If the mapping table is not powered off and restarted in the process of recovering the mapping table, the recovery process is not different from the original recovery process except that the position information in the scanning process is recorded, and if the power failure is not stopped in the process of recovering the mapping table, the new algorithm can achieve the purpose of recovering the mapping table, and the effect is better.
According to the full-disk scanning method based on outage continuation, when user data are scanned, besides the mapping table information, the position of the user data is recorded in the NAND Flash, when outage occurs, if the mapping table information is complete, scanning is started from the position of the recorded user data, if the mapping table information is incomplete, scanning is started from the position where the sequenced user data are started, and the position of the user data in the scanning process needs to be recorded no matter where the scanning is started, so that the resumption of the scanning process of the outage next time is facilitated, the system can still recover the mapping table after the outage is restarted, the influence of outage on the restoration of the mapping table is reduced, and the full-disk scanning efficiency is improved.
Referring to fig. 5, fig. 5 is a schematic block diagram of a full-disc scanning apparatus based on power-down resume according to an embodiment of the present application.
The full-disk scanning device based on power-off resumption comprises an integrity judgment unit 2, an emptying unit 3, a position acquisition unit 4, a scanning storage unit 5, a scanning judgment unit 6 and a notification unit 7.
And the integrity judging unit 2 is used for judging whether the current mapping table is complete.
And the clearing unit 3 is used for clearing useless mapping table information if the mapping table information is not available, and taking the position of the initial user data as the initial position.
And the position acquisition unit 4 is used for acquiring the scanned user data position before power failure as an initial position according to the mapping table information if the position is positive.
And the scanning storage unit 5 is used for scanning the user data in sequence and storing the mapping table information and the position information of the currently scanned user data in the NAND Flash.
And a scanning judgment unit 6, configured to judge whether all user data are scanned completely.
And the notification unit 7 is configured to output a notification that the mapping table is successfully restored if the mapping table is successfully restored.
Preferably, the above apparatus further comprises a state judgment unit 1.
And a state judging unit 1 for judging whether the state of full disk scanning based on power-off resumption before power-off is that scanning of user data is not started.
In addition, the device also comprises a power-off processing unit 8, and the power-off processing unit 8 is used for starting and restarting when a power-off phenomenon occurs.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the full-disc scanning apparatus and unit based on power-off resume described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
According to the full-disk scanning device based on outage continuation, when user data are scanned, besides the mapping table information, the position of the user data is recorded in the NAND Flash, when outage occurs, if the mapping table information is complete, scanning is started from the position of the recorded user data, if the mapping table information is incomplete, scanning is started from the position where the sequenced user data are started, and the position of the user data in the scanning process needs to be recorded no matter where the scanning is started, so that the resumption of the scanning process of the outage next time is facilitated, the system can still recover the mapping table after the outage is restarted, the influence of outage on the restoration of the mapping table is reduced, and the full-disk scanning efficiency is improved.
The full disk scanning apparatus based on power-off resume may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 6.
Referring to fig. 6, fig. 6 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 700 may be a terminal or a server.
Referring to fig. 6, the computer device 700 includes a processor 720, a memory, which may include a non-volatile storage medium 730 and an internal memory 740, and a network interface 750, which are connected by a system bus 710.
The non-volatile storage medium 730 may store an operating system 731 and computer programs 732. The computer programs 732, when executed, enable the processor 720 to perform any of a variety of full disk scanning methods based on power-down resume.
The processor 720 is used to provide computing and control capabilities, supporting the operation of the overall computer device 700.
The internal memory 740 provides an environment for the execution of the computer program 732 in the non-volatile storage medium 730, and when the computer program 732 is executed by the processor 720, the processor 720 can execute any one of the full-disk scanning methods based on power-down resume.
The network interface 750 is used for network communication such as sending assigned tasks and the like. Those skilled in the art will appreciate that the configuration shown in fig. 6 is a block diagram of only a portion of the configuration relevant to the present teachings and is not intended to limit the computing device 700 to which the present teachings may be applied, and that a particular computing device 700 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components. Wherein the processor 720 is configured to execute the program code stored in the memory to perform the following steps:
judging whether the current mapping table is complete;
if not, clearing useless mapping table information, and taking the position of the most initial user data as an initial position;
if so, acquiring a user data position scanned before power failure according to the mapping table information to serve as an initial position;
scanning the user data in sequence, and storing mapping table information and position information of the currently scanned user data in NAND Flash;
judging whether all the user data are scanned completely;
if yes, outputting a notification of successful restoration of the mapping table;
if not, returning to the step of scanning the user data in sequence from the initial position and storing the mapping table information in the NAND Flash.
In one embodiment, the processor 720 is configured to execute the program code stored in the memory to implement the following steps before the determining whether the current mapping table is complete is further implemented:
judging whether the state of full-disk scanning based on power-off continuity before power-off is that user data is not scanned;
if not, entering a step of judging whether the current mapping table is complete;
if yes, the step of clearing useless mapping table information is carried out.
In an embodiment, the location information of the user data includes a channel where the user data is located, a chip select where the user data is located, an erasing unit where the user data is located, and a reading and writing unit where the user data is located;
the processor 720 is configured to run the program code stored in the memory to scan the user data in sequence from the starting position, and store the mapping table information and the position information of the currently scanned user data in the NAND Flash, and further implement the following steps:
and starting and restarting when the power failure phenomenon occurs, and entering a step of judging whether the state of the full-disk scanning based on the power failure continuation before the power failure is that the user data is not scanned.
It should be understood that, in the embodiment of the present Application, the Processor 720 may be a Central Processing Unit (CPU), and the Processor 720 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that the configuration of computer device 700 depicted in FIG. 6 is not intended to be limiting of computer device 700 and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
According to the computer equipment, when the user data are scanned, besides the mapping table information, the position of the user data is recorded in the NAND Flash, when the power failure occurs, if the mapping table information is complete, scanning is started from the position of the recorded user data, if the mapping table information is incomplete, scanning is started from the position where the sequenced user data starts, and no matter which position the user data in the scanning process starts to be recorded, so that the next power failure scanning process is repeated, the system can still recover the mapping table after the power failure is restarted, the influence of the power failure on the recovery of the mapping table is reduced, and the efficiency of full-disk scanning is improved.
In addition, a medium is provided, which stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform any one of the above-mentioned full-disk scanning methods based on power-off resumption.
According to the medium, when the user data is scanned, besides the mapping table information, the position of the user data is recorded in the NAND Flash, when power failure occurs, if the mapping table information is complete, scanning is started from the position of the recorded user data, if the mapping table information is incomplete, scanning is started from the position where the sequenced user data starts, and the position of the user data in the scanning process needs to be recorded no matter which position the user data in the scanning process starts to be scanned, so that the next power failure scanning process is repeated, the system can still recover the mapping table after the power failure is restarted, the influence of the power failure on the recovery of the mapping table is reduced, and the efficiency of full-disk scanning is improved.
The technical contents of the present invention are further illustrated by the examples only for the convenience of the reader, but the embodiments of the present invention are not limited thereto, and any technical extension or re-creation based on the present invention is protected by the present invention. The protection scope of the invention is subject to the claims.
Claims (8)
1. A full-disk scanning method based on power-off resumption is characterized by comprising the following steps:
judging whether the current mapping table is complete;
if not, clearing useless mapping table information, and taking the position of the most initial user data as an initial position;
if so, acquiring a user data position scanned before power failure according to the mapping table information to serve as an initial position;
scanning the user data in sequence, and storing mapping table information and position information of the currently scanned user data in NAND Flash;
judging whether all the user data are scanned completely;
if yes, outputting a notification of successful restoration of the mapping table;
if not, returning to the step of scanning the user data in sequence from the initial position and storing mapping table information in the NAND Flash;
the position information of the user data comprises a channel where the user data is located, a chip selection where the user data is located, an erasing unit where the user data is located and a reading and writing unit where the user data belongs.
2. The method for full-disc scanning based on power-off resumption of claim 1, wherein before the step of determining whether the current mapping table is complete, the method further comprises:
judging whether the state of full-disk scanning based on power-off continuity before power-off is that user data is not scanned;
if not, entering a step of judging whether the current mapping table is complete;
if yes, the step of clearing useless mapping table information is carried out.
3. The power-down-continuation-based full-disk scanning method according to claim 1 or 2, wherein the method further comprises:
when the user data is scanned from the initial position in sequence, and mapping table information and the position information of the currently scanned user data are stored in the NAND Flash, the computer is started and restarted when a power failure phenomenon occurs, and the computer enters a step of judging whether the state of the full-disk scanning based on the power failure continuation before the power failure is the state that the user data is not scanned.
4. The full-disk scanning device based on outage continuation is characterized by comprising an integrity judgment unit, an emptying unit, a position acquisition unit, a scanning storage unit, a scanning judgment unit and a notification unit;
the integrity judging unit is used for judging whether the current mapping table is complete or not;
the clearing unit is used for clearing useless mapping table information if the user data is not the initial user data, and taking the position of the initial user data as an initial position;
the position acquisition unit is used for acquiring a user data position scanned before power failure according to mapping table information as an initial position if the position acquisition unit is used for acquiring the user data position scanned before power failure according to the mapping table information;
the scanning storage unit is used for scanning the user data in sequence and storing mapping table information and position information of the currently scanned user data in the NAND Flash;
the scanning judgment unit is used for judging whether all the user data are scanned completely;
the notification unit is used for outputting a notification that the mapping table is successfully recovered if the mapping table is successfully recovered;
the position information of the user data comprises a channel where the user data is located, a chip selection where the user data is located, an erasing unit where the user data is located and a reading and writing unit where the user data is located.
5. The power-down-continuation-based full-disk scanning device according to claim 4, wherein the device further comprises a status determination unit;
and the state judgment unit is used for judging whether the state of full disk scanning based on power-off resumption before power-off is that user data is not started to be scanned.
6. The full disk scanning device based on power-off resuming of claim 4, wherein the device further comprises a power-off processing unit, and the power-off processing unit is configured to perform power-on resuming when a power-off phenomenon occurs.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the power-down resume-based full disk scan method according to any one of claims 1 to 3 when executing the computer program.
8. A medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the power-down continuation-based full disk scanning method of any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810480025.4A CN108804033B (en) | 2018-05-18 | 2018-05-18 | Full-disk scanning method and device based on power-off continuation, computer equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810480025.4A CN108804033B (en) | 2018-05-18 | 2018-05-18 | Full-disk scanning method and device based on power-off continuation, computer equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108804033A CN108804033A (en) | 2018-11-13 |
CN108804033B true CN108804033B (en) | 2021-04-20 |
Family
ID=64091025
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810480025.4A Active CN108804033B (en) | 2018-05-18 | 2018-05-18 | Full-disk scanning method and device based on power-off continuation, computer equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804033B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110704241B (en) * | 2019-09-12 | 2022-10-28 | 浪潮电子信息产业股份有限公司 | Method, device, equipment and medium for recovering file metadata |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102073595A (en) * | 2011-01-24 | 2011-05-25 | 华亚微电子(上海)有限公司 | Power failure prevention loss balanced storage method |
CN102737715A (en) * | 2011-04-02 | 2012-10-17 | 航天信息股份有限公司 | Data brown-out protection method for NOR flash memory |
CN103279366A (en) * | 2013-04-24 | 2013-09-04 | 中国科学院苏州纳米技术与纳米仿生研究所 | Solid state disk and method for rapidly start-up based on solid state disk after power failure |
CN103996412A (en) * | 2013-02-19 | 2014-08-20 | 北京同方微电子有限公司 | Power-fail protection method applied to intelligent-card nonvolatile memories |
CN105138432A (en) * | 2015-08-31 | 2015-12-09 | 深圳市瑞耐斯技术有限公司 | Solid state disk data fast backup method and system used under abnormal power failure |
CN105224478A (en) * | 2015-09-25 | 2016-01-06 | 联想(北京)有限公司 | A kind of formation of mapping table, renewal and restoration methods and electronic equipment |
CN106055279A (en) * | 2016-06-12 | 2016-10-26 | 浪潮(北京)电子信息产业有限公司 | Method and device for managing address mapping table of solid state disk and solid state disk |
CN106294026A (en) * | 2016-08-19 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | Mapping table restoration methods after a kind of solid-state disk powered-off fault and system thereof |
CN106502928A (en) * | 2016-09-29 | 2017-03-15 | 华为技术有限公司 | A kind of storage system power-off protection method, storage control and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9654915B2 (en) * | 2014-09-26 | 2017-05-16 | Intel Corporation | Systems and methods for adjusting wireless scan rates |
-
2018
- 2018-05-18 CN CN201810480025.4A patent/CN108804033B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102073595A (en) * | 2011-01-24 | 2011-05-25 | 华亚微电子(上海)有限公司 | Power failure prevention loss balanced storage method |
CN102737715A (en) * | 2011-04-02 | 2012-10-17 | 航天信息股份有限公司 | Data brown-out protection method for NOR flash memory |
CN103996412A (en) * | 2013-02-19 | 2014-08-20 | 北京同方微电子有限公司 | Power-fail protection method applied to intelligent-card nonvolatile memories |
CN103279366A (en) * | 2013-04-24 | 2013-09-04 | 中国科学院苏州纳米技术与纳米仿生研究所 | Solid state disk and method for rapidly start-up based on solid state disk after power failure |
CN105138432A (en) * | 2015-08-31 | 2015-12-09 | 深圳市瑞耐斯技术有限公司 | Solid state disk data fast backup method and system used under abnormal power failure |
CN105224478A (en) * | 2015-09-25 | 2016-01-06 | 联想(北京)有限公司 | A kind of formation of mapping table, renewal and restoration methods and electronic equipment |
CN106055279A (en) * | 2016-06-12 | 2016-10-26 | 浪潮(北京)电子信息产业有限公司 | Method and device for managing address mapping table of solid state disk and solid state disk |
CN106294026A (en) * | 2016-08-19 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | Mapping table restoration methods after a kind of solid-state disk powered-off fault and system thereof |
CN106502928A (en) * | 2016-09-29 | 2017-03-15 | 华为技术有限公司 | A kind of storage system power-off protection method, storage control and electronic equipment |
Non-Patent Citations (1)
Title |
---|
"提高MLC NAND Flash存储系统可靠性的方法研究";黄敏;《中国优秀博硕士学位伦文全文数据库(博士)-信息科技辑》;20170228;第28-29页第1.3.5-1.3.6节 * |
Also Published As
Publication number | Publication date |
---|---|
CN108804033A (en) | 2018-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7558904B2 (en) | Controller, data memory system, data rewriting method, and computer program product | |
US20110099325A1 (en) | User device and mapping data management method thereof | |
CN109508148B (en) | Metadata reconstruction method and device and computer readable storage medium | |
US11467645B2 (en) | Storage device and method for sudden power off recovery thereof | |
CN111142781B (en) | Data storage device and data processing method | |
CN107678420B (en) | engine data online storage method | |
CN104424047A (en) | NVRAM data recovery method and NVRAM data recovery device | |
CN108804033B (en) | Full-disk scanning method and device based on power-off continuation, computer equipment and medium | |
CN109284070B (en) | Solid-state storage device power-off recovery method based on STT-MRAM | |
CN109582332B (en) | System upgrading method and device for Internet camera | |
US11294779B2 (en) | Memory device providing fast data recovery | |
CN117033268B (en) | SSD controller, data processing method, device and storage medium | |
JP2015114750A (en) | Examination program, information processing device, and information processing method | |
CN112181725A (en) | Power-down anti-pulling backup method and system for on-chip and off-chip data of embedded system | |
CN110865772A (en) | Method and device for protecting system data physical block erasure count value, computer equipment and storage medium | |
KR101691091B1 (en) | Computing system and hibernation method thereof | |
CN110286850B (en) | Writing method and recovery method of metadata of solid state disk and solid state disk | |
JP4239754B2 (en) | Nonvolatile memory system | |
CN114168082B (en) | Method, device, computer equipment and storage medium for avoiding SSD idle block exhaustion | |
CN111813748B (en) | File system mounting method and device, electronic equipment and storage medium | |
CN112908390B (en) | Data storage method, device, electronic equipment and storage medium | |
CN116204353B (en) | Recovery and restoration method, device and equipment of vehicle-mounted system and storage medium | |
US11809314B2 (en) | Method and apparatus for performing access control of memory device with aid of multi-stage garbage collection management | |
CN112579360A (en) | System backup and restoration method based on kylin operating system embedded platform | |
CN115437853B (en) | Cache data protection method and system under system abnormal restart |
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 |