CN108804033A - Scan full hard disk method, apparatus, computer equipment and the medium continued again based on power-off - Google Patents

Scan full hard disk method, apparatus, computer equipment and the medium continued again based on power-off Download PDF

Info

Publication number
CN108804033A
CN108804033A CN201810480025.4A CN201810480025A CN108804033A CN 108804033 A CN108804033 A CN 108804033A CN 201810480025 A CN201810480025 A CN 201810480025A CN 108804033 A CN108804033 A CN 108804033A
Authority
CN
China
Prior art keywords
power
user data
hard disk
map information
full hard
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
CN201810480025.4A
Other languages
Chinese (zh)
Other versions
CN108804033B (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.)
Ramaxel Technology Shenzhen Co Ltd
Original Assignee
Ramaxel Technology Shenzhen 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 Ramaxel Technology Shenzhen Co Ltd filed Critical Ramaxel Technology Shenzhen Co Ltd
Priority to CN201810480025.4A priority Critical patent/CN108804033B/en
Publication of CN108804033A publication Critical patent/CN108804033A/en
Application granted granted Critical
Publication of CN108804033B publication Critical patent/CN108804033B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0667Virtualisation aspects at data level, e.g. file, record or object virtualisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Sources (AREA)

Abstract

The present invention relates to the scan full hard disk method, apparatus, computer equipment and the medium that are continued based on power-off again, this method includes judging whether current mapping table is complete;If it is not, then useless map information is emptied, using the position where the user data most originated as initial position;If so, the user data position scanned before power-off is obtained according to map information, as initial position;User data is scanned in order, and the location information of map information and Current Scan user data is stored in NAND Flash;Judge whether all customer data is all scanned;It is successfully notified if so, output restores mapping table;User data is scanned in order from initial position if it is not, then returning, and map information is stored in the step in NAND Flash.The present invention realizes after power-off restarting, can still provide for the recovery of mapping table, reduces the influence that power-off restores mapping table, improves the efficiency of scan full hard disk.

Description

Scan full hard disk method, apparatus, computer equipment and the medium continued again based on power-off
Technical field
The present invention relates to memories, more specifically refer to based on power-off again continuous scan full hard disk method, apparatus, computer Equipment and storage medium.
Background technology
When being lost based on the map information that the scan full hard disk algorithm that power-off continues refers to logical address to physical address again, press The process for restoring map information is scanned by write sequence according to user data.Based on power-off again continuous scan full hard disk be according to What the write sequence of user data was scanned, write sequence of the user data between different erasing units has special field It is recorded, the write sequence inside erasing unit is fixed.After unit will be wiped by write sequence sequence, take out most The erasing unit of data is first written.The data wiped on unit are sequential read out by read-write cell sequence, in each read-write cell There is special regional record the information for the logical address being written in this physical address in the content of reading.
As shown in Figure 1, being referred to as the areas meta for recording the region of logical address in read-write cell information, the regions meta are The part in the areas spare of read-write cell in NAND flash, it is corresponding that FTL modules using the areas meta store this physical address Logical address.Write on physical address ppa0's at the beginning of the data of logical address lpa0 during user data is written Position, manifolding is to the position of ppa1 again later, during mapping table restores, as shown in Fig. 2, first in the position of ppa0 Lpa0 is read, the mapping relations of logical address to physical address are (lpa0, ppa0) at this time, in the position of ppa1 after continuing to scan on It sets and also reads into lpa0, the mapping relations of logical address to physical address are updated to (lpa0, ppa1) at this time, if will be all later The erasing unit of storage user data all scan one time, do not read in the regions meta of NAND Flash other read-write cells Lpa0, then illustrate that logical address lpa0 is mapped to the position of physical address ppa1, and user's expectation can be read at the position of ppa1 Data, equally, other logical addresses are also to find corresponding storage location using same method.
As shown in figure 3, the starting point based on power-off again continuous scan full hard disk user data is erasing unit 20, scan successively Other user data, scanning reach certain data volume and just the mapping table currently restored are saved in NAND Flash, it After continue to scan on, scanned through until by all user data, the mapping table preserved in NAND at this time is exactly reflecting of restoring again Firing table.
The present scan full hard disk algorithm continued again based on power-off can achieve the purpose that restore mapping table, but need to be maintained at It cannot be powered off restore mapping table based on the scan full hard disk that power-off continues again during.When TF card capacity is bigger, based on power-off The time of continuous scan full hard disk recovery mapping table can be relatively more long again, if gone out during based on continuous scan full hard disk is powered off again It now powers off, then the information restored before is all cancelled, needs accent to start when system powers on again, i.e., by all users Data re-start scanning, in addition, during TF card use, it may be necessary to data are ceaselessly read and write, but based on disconnected Since map information does not restore to cannot respond to read-write operation the scan full hard disk that electricity continues again during, based on power-off Read-write time-out can be led to by continuing read-write operation during continuous scan full hard disk again, and after read-write is overtime, host will be considered that TF card is abnormal, and host actively initiates power-off restarting operation, power-off restarting operation can cause based on power off the scan full hard disk that continues again without Method smoothly terminates, and powers on scan full hard disk, read-write time-out, the mistake of power-off restarting for repeating to continue again based on power-off again Journey powers on as described above and all repeats identical process every time, and TF card does not obtain time enough and completes the extensive of mapping table It is multiple, also just it can not work normally.
Therefore, it is necessary to design a kind of new scan full hard disk method continued based on power-off again, realizes after power-off restarting, be System can still provide for the recovery of mapping table, reduces the influence that power-off restores mapping table, improves the efficiency of scan full hard disk.
Invention content
It is an object of the invention to overcome the deficiencies of existing technologies, provide based on power-off again continuous scan full hard disk method, dress It sets, computer equipment and storage medium.
To achieve the above object, the present invention uses following technical scheme:It is described based on the scan full hard disk method that power-off continues again Method includes:
Judge whether current mapping table is complete;
If it is not, then useless map information is emptied, using the position where the user data most originated as start bit It sets;
If so, the user data position scanned before power-off is obtained according to map information, as initial position;
User data is scanned in order, and by map information and the location information of Current Scan user data It is stored in NAND Flash;
Judge whether all customer data is all scanned;
It is successfully notified if so, output restores mapping table;
User data is scanned in order from initial position if it is not, then returning, and map information is stored in Step in NAND Flash.
Its further technical solution is:Before the step for judging whether current mapping table is complete, further include:
Judge whether the state based on power-off again continuous scan full hard disk before power-off is not start to scan user data;
Judge the whether complete step of current mapping table if it is not, then entering;
If so, into the step of useless map information is emptied.
Its further technical solution is:The method further includes:
When carrying out being scanned in order to user data, and by the position of map information and Current Scan user data During confidence breath is stored in the step in NAND Flash, booting is restarted when there is circut breaking, and is entered and judged power-off Whether the state before based on power-off again continuous scan full hard disk is the step of not starting to scan user data.
Its further technical solution is:User data is scanned in order from initial position, and by map information And the location information of Current Scan user data is stored in the step in NAND Flash, the location information packet of user data Include place channel, the choosing of place piece, place erasing unit and the affiliated read-write cell of user data.
The present invention also provides based on power-off again continuous scan full hard disk device, including integrality judging unit, empty unit, Position acquisition unit, scanning storage unit, scanning judging unit and notification unit;
The integrality judging unit, for judging whether current mapping table is complete;
It is described to empty unit, it, will be where the user data most originated for if it is not, then empty useless map information Position as initial position;
The position acquisition unit, for if so, obtaining the user data scanned before power-off according to map information Position, as initial position;
The scanning storage unit, for being scanned in order to user data, and by map information and currently The location information of scanning user data is stored in NAND Flash;
The scanning judging unit, for judging whether all customer data is all scanned;
The notification unit, for if so, output recovery mapping table successfully notifies.
Its further technical solution is:Described device further includes condition adjudgement unit;
The condition adjudgement unit, for judging whether the state based on power-off again continuous scan full hard disk before power-off is not Start to scan user data.
Its further technical solution is:Described device further includes power down process unit, and the power down process unit is used for out Booting is restarted when existing circut breaking.
The present invention also provides a kind of computer equipment, including memory, processor and it is stored on the memory simultaneously The computer program that can be run on the processor, the processor realized when executing the computer program it is above-mentioned based on The scan full hard disk method that power-off continues again.
The present invention also provides a kind of medium, it includes journey that the media storage, which has computer program, the computer program, Sequence instructs, and described program instruction when being executed by a processor executes the processor above-mentioned to be swept totally based on power-off is again continuous Retouch method.
Compared with the prior art, the invention has the advantages that:The scan full hard disk method of the present invention continued again based on power-off, By when scanning user data, other than memory map assignments information, where recording user data also in NAND Flash Position, if map information is complete, scanned since the position where the user data of record when powering off, if Map information is imperfect, then is scanned the position since ordering user data is most, no matter since which position Scanning is required for by the user data position record in scanning process, in order to continuing for power-off scanning process next time again, in fact After present power-off restarting, system can still provide for the recovery of mapping table, reduce the influence that power-off restores mapping table, and raising is swept totally The efficiency retouched.
The invention will be further described in the following with reference to the drawings and specific embodiments.
Description of the drawings
Fig. 1 is the distribution map of the read-write cell information of the prior art;
Fig. 2 is the flow chart that the map information of the prior art restores;
Fig. 3 is the flow chart based on power-off again continuous scan full hard disk of the prior art;
Fig. 4 is the flow chart based on power-off again continuous scan full hard disk method that a specific embodiment of the invention provides;
Fig. 5 is the structure diagram based on power-off again continuous scan full hard disk device that a specific embodiment of the invention provides;
Fig. 6 is a kind of structure diagram for computer equipment that a specific embodiment of the invention provides.
Specific implementation mode
In order to more fully understand the present invention technology contents, with reference to specific embodiment to technical scheme of the present invention into One step introduction and explanation, but not limited to this.
Specific embodiment as shown in figures 4-6, the scan full hard disk method provided in this embodiment continued again based on power-off, can To be used in the recovery for carrying out map information in power process, realize after power-off restarting, system can still provide for mapping table Restore, reduces the influence that power-off restores mapping table, improve the efficiency of scan full hard disk.
As shown in figure 4, present embodiments provide the scan full hard disk method continued based on power-off again, this method includes:
S2, judge whether current mapping table is complete;
Specifically judge that map information damages, in mapping table recovery process, midway is caused to be cut because of circut breaking It is disconnected, then it is assumed that the mapping table is imperfect.
In the present embodiment, special field shows that this map information writes the mistake of NAND FLASH in system Whether journey terminates, and field is that 0 expression mapping table does not write also with regard to the electricity went off, and current mapping table is imperfect, if this field quilt It is that current mapping table is complete to be set to 1 expression.
S3, if it is not, then useless map information is emptied, using the position where the user data most originated as starting Position;
After the map information damage for finding to be stored on NAND Flash, triggering is needed to continue again based on power-off at this time Scan full hard disk restore map information, it is necessary first to useless map information is emptied from NAND Flash, later Erasing unit to storing user information is scanned one by one according to data write sequence, avoids useless map information to complete The influence of good map information storage, empties useless map information.
S4, if so, the user data position scanned before power-off is obtained according to map information, as initial position;
When there is no map information is imperfect or impaired phenomenon, then obtain scan before power-off it is last One user data position, is scanned since the position, without being scanned since all customer data, reduces power-off to mapping table The influence of recovery process.
S5, user data is scanned in order, and by the position of map information and Current Scan user data Information storage is in NAND Flash;
In the present embodiment, the location information of above-mentioned user data include the place channel of user data, place piece choosing, Wipe unit and affiliated read-write cell in place.
Specifically user data is scanned in sequence from initial position.
When scanning certain amount of user data (for example reaching 4092 logical mappings addresses of maximum capacity), will currently it restore Map information write-in NAND Flash in, by the position of the user data of Current Scan while map information is written Information is also recorded in NAND Flash, if powered off later, be again started up continue it is again continuous overall based on power-off Starting point based on power-off again continuous scan full hard disk when scanning restores mapping table is no longer the original position of user data write-in, and The position of location information record, to reduce based on power-off again continuous scan full hard disk due to power-off restarting repeat consumption when Between.
Based in power-off again continuous scan full hard disk algorithm, the starting point of scanning is erasing unit 20 original, based on The scan full hard disk that power-off continues again during after power-off restarting, the scan start point in original technology is all erasing unit 20, The starting point scanned for the first time in the present embodiment is erasing unit 20, deposits map information after scanning certain data volume On NAND Flash, user data scanning at this time to the position of ppa2, the location information of ppa2 is also recorded in simultaneously for storage In NAND Flash.If resolved after having recorded ppa2 and before triggering mapping table storage next time not yet Electricity, the starting point scanned when restarting are ppa2.
S6, judge whether all customer data is all scanned;
The scanning step that above-mentioned S5 steps are all made of to all user data is scanned, until by all numbers of users According to all scanned, the recovery of all mapping tables is completed.
S7, it is successfully notified if so, exporting and restoring mapping table;If it is not, the step of then returning to S5.
Preferably, in the present embodiment, above-mentioned S2 steps, the step for judging whether current mapping table complete it Before, further include:
S1, judge whether the state based on power-off again continuous scan full hard disk before power-off is not start to scan user data;
If it is not, then entering S2 steps;
If so, into S3 steps.
Specifically, there is special field for recording the variation based on power-off again continuous scan full hard disk state, do not start to sweep It retouches user data and is recorded in NOR flash with the scanning user data state that be two different, this state change is had begun In.
In addition, in the present embodiment, above-mentioned method further includes:
When carrying out S5 steps, user data is scanned in order, and by map information and Current Scan user During the location information of data is stored in the step in NAND Flash, booting is restarted when there is circut breaking, and is entered S1 steps.
It also needs to record the shape based on power-off again continuous scan full hard disk during the scan full hard disk continued based on power-off again In state to NOR Flash, the state checked before power-off is needed to confirm base in new restarting procedure after power-off restarting In the flow of power-off again continuous scan full hard disk.If removed without power-off restarting, the process of recovery during mapping table restores It has recorded and is not different with original recovery process except the location information in scanning process, mapping table restores during In the case of not stopping power-off, new algorithm can achieve the purpose that restore mapping table, and effect is more preferable.
It is above-mentioned based on power-off again continuous scan full hard disk method, by when scanning user data, in addition to memory map assignments Except information, the position where user data is recorded also in NAND Flash, when powering off, if map information is complete It is whole, then it is scanned since the position where the user data of record, if map information is imperfect, from ordering number of users Start to scan according to the position most started, no matter scans and be required for the place of the user data in scanning process since which position Position records, and in order to continuing for power-off scanning process next time again, realizes after power-off restarting, system can still provide for the extensive of mapping table It is multiple, the influence that power-off restores mapping table is reduced, the efficiency of scan full hard disk is improved.
Fig. 5 is please referred to, Fig. 5 is the schematic frame provided by the embodiments of the present application based on power-off again continuous scan full hard disk device Figure.
The scan full hard disk device continued again based on power-off comprising integrality judging unit 2 empties unit 3, position acquisition list Member 4, scanning storage unit 5, scanning judging unit 6 and notification unit 7.
Integrality judging unit 2, for judging whether current mapping table is complete.
Unit 3 is emptied, it, will be where the user data most originated for if it is not, then empty useless map information Position is as initial position.
Position acquisition unit 4, for if so, obtaining the user bit scanned before power-off according to map information It sets, as initial position.
Storage unit 5 is scanned, for being scanned in order to user data, and by map information and Current Scan The location information of user data is stored in NAND Flash.
Judging unit 6 is scanned, for judging whether all customer data is all scanned.
Notification unit 7, for if so, output recovery mapping table successfully notifies.
Preferably, above-mentioned device further includes condition adjudgement unit 1.
Condition adjudgement unit 1, for judging whether the state based on power-off again continuous scan full hard disk before power-off is not open Begin scanning user data.
In addition, above-mentioned device further includes power down process unit 8, power down process unit 8 is opened when for circut breaking occur Machine is restarted.
It is apparent to those skilled in the art that for convenience of description and succinctly, the base of foregoing description In the specific work process of power-off again continuous scan full hard disk device and unit, corresponding in preceding method embodiment can be referred to Journey, details are not described herein.
It is above-mentioned based on power-off again continuous scan full hard disk device, by when scanning user data, in addition to memory map assignments Except information, the position where user data is recorded also in NAND Flash, when powering off, if map information is complete It is whole, then it is scanned since the position where the user data of record, if map information is imperfect, from ordering number of users Start to scan according to the position most started, no matter scans and be required for the place of the user data in scanning process since which position Position records, and in order to continuing for power-off scanning process next time again, realizes after power-off restarting, system can still provide for the extensive of mapping table It is multiple, the influence that power-off restores mapping table is reduced, the efficiency of scan full hard disk is improved.
The above-mentioned scan full hard disk device continued again based on power-off can be implemented as a kind of form of computer program, computer journey Sequence can be run on computer equipment as shown in FIG. 6.
Referring to Fig. 6, Fig. 6 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The computer 700 equipment of equipment can be terminal or server.
With reference to Fig. 6, which includes processor 720, memory and the net connected by system bus 710 Network interface 750, wherein memory may include non-volatile memory medium 730 and built-in storage 740.
The non-volatile memory medium 730 can storage program area 731 and computer program 732.The computer program 732 It is performed, processor 720 may make to execute the scan full hard disk method that any one is continued again based on power-off.
The processor 720 supports the operation of entire computer equipment 700 for providing calculating and control ability.
The built-in storage 740 provides environment for the operation of the computer program 732 in non-volatile memory medium 730, should When computer program 732 is executed by processor 720, it is again continuous overall based on power-off to may make that processor 720 executes any one Scan method.
The network interface 750 such as sends the task dispatching of distribution for carrying out network communication.Those skilled in the art can manage Solution, structure shown in Fig. 6 are not constituted only with the block diagram of the relevant part-structure of application scheme to the application side The restriction for the computer equipment 700 that case is applied thereon, specific computer equipment 700 may include more than as shown in the figure Or less component, it either combines certain components or is arranged with different components.Wherein, the processor 720 is for transporting Row program code stored in memory, to realize following steps:
Judge whether current mapping table is complete;
If it is not, then useless map information is emptied, using the position where the user data most originated as start bit It sets;
If so, the user data position scanned before power-off is obtained according to map information, as initial position;
User data is scanned in order, and by map information and the location information of Current Scan user data It is stored in NAND Flash;
Judge whether all customer data is all scanned;
It is successfully notified if so, output restores mapping table;
User data is scanned in order from initial position if it is not, then returning, and map information is stored in Step in NAND Flash.
In one embodiment, the processor 720 is realized described for running program code stored in memory Before judging whether current mapping table is complete, following steps are also realized:
Judge whether the state based on power-off again continuous scan full hard disk before power-off is not start to scan user data;
Judge the whether complete step of current mapping table if it is not, then entering;
If so, into the step of useless map information is emptied.
In one embodiment, wherein the location information of the user data includes the place channel of user data, place piece Choosing, place erasing unit and affiliated read-write cell;
The processor 720 is carried out from initial position with realizing by suitable for running program code stored in memory Ordered pair user data is scanned, and the location information of map information and Current Scan user data is stored in NAND During in Flash, following steps are also realized:
Booting is restarted when there is circut breaking, and enters the state based on power-off again continuous scan full hard disk before judging power-off Whether it is the step of not starting to scan user data.
It should be appreciated that in the embodiment of the present application, processor 720 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or Person's processor can also be any conventional processor etc..
It will be understood by those skilled in the art that 700 structure of computer equipment shown in Fig. 6 is not constituted and is set to computer Standby 700 restriction may include either combining certain components or different component cloth than illustrating more or fewer components It sets.
Above-mentioned computer equipment, by when scanning user data, other than memory map assignments information, also in NAND Position in Flash where record user data, when powering off, if map information is complete, from the number of users of record Start to scan according to the position at place, if map information is imperfect, the position since ordering user data is most No matter scanning scans the user data position record being required in scanning process, in order under since which position Secondary power-off scanning process continues again, realizes after power-off restarting, and system can still provide for the recovery of mapping table, reduces power-off to mapping The influence that table restores, improves the efficiency of scan full hard disk.
In addition, additionally providing a kind of medium, it includes program that the media storage, which has computer program, the computer program, Instruction, it is heavy based on power-off described in above-mentioned any one that described program instruction when being executed by a processor executes the processor Continuous scan full hard disk method.
Above-mentioned medium, by when scanning user data, other than memory map assignments information, also in NAND Flash Position where interior record user data, when powering off, if map information is complete, where the user data of record Position start to scan, if map information is imperfect, scanned the position since ordering user data is most, nothing By the user data position record being required in scanning process is scanned since which position, in order to which power-off next time is swept It retouches continuing again for process, realizes after power-off restarting, system can still provide for the recovery of mapping table, reduce what power-off restored mapping table It influences, improves the efficiency of scan full hard disk.
It is above-mentioned only with embodiment come the technology contents that further illustrate the present invention, in order to which reader is easier to understand, but not It represents embodiments of the present invention and is only limitted to this, any technology done according to the present invention extends or recreation, by the present invention's Protection.Protection scope of the present invention is subject to claims.

Claims (9)

1. the scan full hard disk method continued based on power-off again, which is characterized in that the method includes:
Judge whether current mapping table is complete;
If it is not, then useless map information is emptied, using the position where the user data most originated as initial position;
If so, the user data position scanned before power-off is obtained according to map information, as initial position;
User data is scanned in order, and the location information of map information and Current Scan user data is stored In NAND Flash;
Judge whether all customer data is all scanned;
It is successfully notified if so, output restores mapping table;
User data is scanned in order from initial position if it is not, then returning, and map information is stored in NAND Step in Flash.
2. the scan full hard disk method according to claim 1 continued based on power-off again, which is characterized in that the judgement is currently reflected Before the whether complete step of firing table, further include:
Judge whether the state based on power-off again continuous scan full hard disk before power-off is not start to scan user data;
Judge the whether complete step of current mapping table if it is not, then entering;
If so, into the step of useless map information is emptied.
3. the scan full hard disk method according to claim 1 or 2 continued based on power-off again, which is characterized in that the method is also Including:
When carrying out being scanned in order to user data from initial position, and by map information and Current Scan number of users According to the step that is stored in NAND Flash of location information during, booting is restarted when there is circut breaking, and is entered and sentenced Whether the state based on power-off again continuous scan full hard disk before electricity is the step of not starting to scan user data absolutely.
4. according to claim 1 or 2 based on power-off again continuous scan full hard disk method, which is characterized in that in order to User data is scanned, and the location information of map information and Current Scan user data is stored in NAND Flash The step of in, the location information of user data includes the place channel of user data, the choosing of place piece, place erasing unit and institute Belong to read-write cell.
5. the scan full hard disk device continued based on power-off again, which is characterized in that including integrality judging unit, empty unit, position Acquiring unit, scanning storage unit, scanning judging unit and notification unit;
The integrality judging unit, for judging whether current mapping table is complete;
It is described to empty unit, for if it is not, then useless map information is emptied, by the position where the user data most originated It sets as initial position;
The position acquisition unit, for if so, obtain the user data position scanned before power-off according to map information, As initial position;
The scanning storage unit, for being scanned in order to user data, and by map information and Current Scan The location information of user data is stored in NAND Flash;
The scanning judging unit, for judging whether all customer data is all scanned;
The notification unit, for if so, output recovery mapping table successfully notifies.
6. according to claim 5 based on power-off again continuous scan full hard disk device, which is characterized in that described device further includes Condition adjudgement unit;
The condition adjudgement unit, for judging whether the state based on power-off again continuous scan full hard disk before power-off is not start Scan user data.
7. according to claim 5 based on power-off again continuous scan full hard disk device, which is characterized in that described device further includes Power down process unit, the power down process unit are switched on when for circut breaking occur and restart.
8. a kind of computer equipment, which is characterized in that including memory, processor and be stored on the memory and can be in institute The computer program run on processor is stated, the processor is realized when executing the computer program as in Claims 1-4 The scan full hard disk method continued again based on power-off described in any one.
9. a kind of medium, which is characterized in that it includes that program refers to that the media storage, which has computer program, the computer program, It enables, described program instruction makes the processor execute the base as described in Claims 1-4 any one when being executed by a processor In the scan full hard disk method that power-off continues again.
CN201810480025.4A 2018-05-18 2018-05-18 Full-disk scanning method and device based on power-off continuation, computer equipment and medium Expired - Fee Related CN108804033B (en)

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 true CN108804033A (en) 2018-11-13
CN108804033B CN108804033B (en) 2021-04-20

Family

ID=64091025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810480025.4A Expired - Fee Related 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704241A (en) * 2019-09-12 2020-01-17 浪潮电子信息产业股份有限公司 Method, device, equipment and medium for recovering file metadata

Citations (10)

* Cited by examiner, † Cited by third party
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
US20160094939A1 (en) * 2014-09-26 2016-03-31 Wey-Yi W. Guy Systems and methods for adjusting wireless scan rates
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

Patent Citations (10)

* Cited by examiner, † Cited by third party
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
US20160094939A1 (en) * 2014-09-26 2016-03-31 Wey-Yi W. Guy Systems and methods for adjusting wireless scan rates
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)

* Cited by examiner, † Cited by third party
Title
黄敏: ""提高MLC NAND Flash存储系统可靠性的方法研究"", 《中国优秀博硕士学位伦文全文数据库(博士)-信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704241A (en) * 2019-09-12 2020-01-17 浪潮电子信息产业股份有限公司 Method, device, equipment and medium for recovering file metadata
CN110704241B (en) * 2019-09-12 2022-10-28 浪潮电子信息产业股份有限公司 Method, device, equipment and medium for recovering file metadata

Also Published As

Publication number Publication date
CN108804033B (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN103136116B (en) Storage system and control device, management method and power interruption recovering method
CN102263874B (en) Image forming apparatus having power saving mode
US20100058007A1 (en) Information processing apparatus and memory management method
US20110099325A1 (en) User device and mapping data management method thereof
US8392797B2 (en) Error correcting controller, flash memory chip system, and error correcting method thereof
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
CN107329704B (en) Cache mirroring method and controller
JP4570891B2 (en) Storage device
TW201432449A (en) Non-volatile memory apparatus and operating method thereof
KR100528973B1 (en) Apparatus and method for garbage collection
CN103577574A (en) High-reliability linear file system based on nand flash
CN104461750B (en) A kind of access method and device of NAND flash
CN105760311A (en) Trim command response method and system and operation system
CN105786722B (en) NVM (non-volatile memory) erasing control method and system based on heterogeneous hybrid memory
CN110704161A (en) Virtual machine creation method and device and computer equipment
CN101854426A (en) Method and system for starting mobile terminal and mobile terminal
US11294779B2 (en) Memory device providing fast data recovery
CN109918318A (en) SSD metadata management method, device, equipment and readable storage medium storing program for executing
US20210382660A1 (en) Apparatus and method for performing recovery operation of memory system
CN102073600A (en) Data backup method, flash memory controller and flash memory storage system
CN108804026A (en) A kind of solid state disk scan full hard disk method and solid state disk
CN115687174A (en) Method for recovering dynamic garbage of solid state disk and solid state disk
CN104408126B (en) A kind of persistence wiring method of database, device and system
CN108804033A (en) Scan full hard disk method, apparatus, computer equipment and the medium continued again based on power-off
CN104424115B (en) Recover method, storage device and the electronic equipment of the preset state of electronic equipment

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210420