CN107544866A - A kind of daily record update method and device - Google Patents

A kind of daily record update method and device Download PDF

Info

Publication number
CN107544866A
CN107544866A CN201610499631.1A CN201610499631A CN107544866A CN 107544866 A CN107544866 A CN 107544866A CN 201610499631 A CN201610499631 A CN 201610499631A CN 107544866 A CN107544866 A CN 107544866A
Authority
CN
China
Prior art keywords
ftl
daily record
frame
blocks
frames
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
CN201610499631.1A
Other languages
Chinese (zh)
Other versions
CN107544866B (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.)
Beijing Memblaze Technology Co Ltd
Original Assignee
Beijing Memblaze Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Memblaze Technology Co Ltd filed Critical Beijing Memblaze Technology Co Ltd
Priority to CN202011427464.2A priority Critical patent/CN112433889B/en
Priority to CN201610499631.1A priority patent/CN107544866B/en
Publication of CN107544866A publication Critical patent/CN107544866A/en
Application granted granted Critical
Publication of CN107544866B publication Critical patent/CN107544866B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1461Backup scheduling policy

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of daily record update method and device are provided, including:Record logical address and physical address corresponding to operation requests;According to the logical address corresponding to operation requests and physical address generation daily record frame;FTL frames are generated using the part of the first FTL blocks, wherein FTL tables include multiple FTL blocks;The FTL frames and daily record frame of generation are stored on NVM, wherein multiple daily record frames of the first FTL blocks form multiple FTL frames composition FTL frame chained lists of daily record frame chained list and the first FTL blocks.By when daily record frame is long, being updated to FTL blocks, effectively improving the speed of journal recovery.

Description

A kind of daily record update method and device
Technical field
The application is related to field of computer technology, more particularly to a kind of daily record update method and device.
Background technology
With the development of science and technology the storage capacity and reaction speed for electronic equipment propose higher and higher requirement, Fig. 1 shows solid storage device of the prior art (Solid Storage Device, SSD) block diagram.Storage device 102 It is coupled by interface 103 with main frame, main frame can be at the information that can be communicated through the above way with storage device 102 Equipment is managed, for example, personal computer, tablet personal computer, server, portable computer, the network switch, router, honeycomb are electric Words, personal digital assistant etc..Storage device 102 includes interface 103, control unit 104, one or more NVM (non-volatile memories Device, Non-Volatile Memory) storage chip 105 and firmware memory 110.Interface 103 can adapt to for example, by The modes such as SATA, IDE, USB, PCIE, NVMe, SCSI, Ethernet, optical-fibre channel and host exchanging data.Control unit 104 is used In data transfer of the control between interface 103, NVM storage chips 105 and firmware memory 110, be additionally operable to storage management, Host logical address is to flash memory physical address map, erasure balance, bad block management etc..Control unit 104 is operationally from firmware The loading firmware of memory 110.
In the solid storage device of prior art, such as in storage device illustrated in fig. 1 102, FTL (Flash are utilized Translation Layer, flash translation layer (FTL)) safeguard the map information from logical address to physical address.Logical address structure The memory space of the solid storage device perceived into upper layer software (applications)s such as operating systems.Physical address is to be used to access solid-state The address of the physical memory cell of storage device.Also implement address of cache using intermediate address form in the prior art.Example Logical address is such as mapped as intermediate address, and then intermediate address is further mapped as physical address.
The table structure for storing the map information from logical address to physical address is referred to as FTL tables.FTL tables are that solid-state is deposited Store up the important metadata in equipment.The data item of usual FTL tables have recorded the ground in solid storage device in units of data page Location mapping relations.The FTL tables of solid storage device have larger size, such as some GB levels.And closed in solid storage device , it is necessary to intactly preserve FTL tables when closing, loaded completely when solid storage device starts, it is necessary to complete FTL.
In the prior art, the logic corresponding to the Physical Page is additionally stored in each Physical Page of solid storage device Address.When solid storage device starts, it is necessary to access all Physical Page, to obtain corresponding to each Physical Page logically Location, and rebuild FTL tables.But such operation will need the plenty of time, and cause solid storage device start-up course time-consuming very It is long.
In Chinese patent application (201510430174.6), there is provided a kind of daily record generates method for reconstructing.
The content of the invention
In view of this, the application provides a kind of daily record update method and device.
According to the first aspect of the invention, there is provided daily record of first according to the first aspect of the invention based on FTL tables Generation method, including:Record logical address and physical address corresponding to operation requests;Corresponding to foundation operation requests logically Location and physical address generation daily record frame;FTL frames are generated using the part of the first FTL blocks, wherein FTL tables include multiple FTL blocks; The FTL frames and daily record frame of generation are stored on NVM, wherein the first FTL blocks multiple daily record frames composition daily record frame chained list and institute State multiple FTL frames composition FTL frame chained lists of the first FTL blocks.
Daily record generation method of first according to the first aspect of the invention based on FTL tables, there is provided according to the present invention's Daily record generation method of the second of first aspect based on FTL tables, wherein, it is different from its of FTL frames or daily record frame to NVM write-ins His frame, selected according to the priority of different frame by the deposit order of FTL frames, daily record frame and other frames.
Daily record generation method of first, second or third according to the first aspect of the invention based on FTL tables, there is provided root According to the 3rd daily record generation method based on FTL tables of the first aspect of the present invention, wherein, in response to recognizing the 2nd FTL blocks Renewal frequency is higher than the renewal frequency of the first FTL blocks, and the FTL frames and daily record frame of the 2nd FTL blocks are preferentially belonged to NVM write-ins.
Daily record generation method of first according to the first aspect of the invention based on FTL tables, there is provided according to the present invention's Daily record generation method of the 4 of first aspect based on FTL tables, wherein, correspond to read-only storage in response to recognizing the 2nd FTL blocks Area, without generating FTL frames for the 2nd FTL blocks.
Daily record generation method of one of first to fourth according to the first aspect of the invention based on FTL tables, there is provided root According to the 5th daily record generation method based on FTL tables of the first aspect of the present invention, in addition to:According to the more newly-generated of bad block table Bad block table more new frame;Bad block table data frame is generated using the part of bad block table block, wherein bad block table includes multiple bad block table blocks; The bad block table more new frame and bad block table data frame of generation are stored on NVM, wherein multiple bad block tables more new frame of the bad block table block Form multiple bad block table data frames composition bad block table data frame chained list of bad block table more new frame chained list and the bad block table block;And To belong to than writing the bad block table more new frame of the bad block table block and the priority of bad block table data vertical frame dimension to NVM to NVM write-ins The FTL frames of 2nd FTL blocks and daily record frame.
Daily record generation method of one of first to fourth according to the first aspect of the invention based on FTL tables, there is provided root According to the 6th daily record generation method based on FTL tables of the first aspect of the present invention, in addition to:According to the volatile of host accessible The more newly-generated first kind frame of property storage region;The second class is generated using the part of the volatile storage area block of host accessible Frame, wherein volatile storage area include multiple volatile storage area blocks;The first kind frame and second of generation is stored on NVM Class frame, wherein the first kind frame composition first kind frame chained list of the volatile storage area block, and the volatile storage area Second class frame of block forms the second class frame chained list.
Daily record generation method of the 6th according to the first aspect of the invention based on FTL tables, there is provided according to the present invention's Daily record generation method of the 7 of first aspect based on FTL tables, in addition to:With than writing the volatile storage area to NVM The priority of the first kind frame of block and the second class vertical frame dimension belongs to the FTL frames and daily record frame of the 2nd FTL blocks to NVM write-ins.
According to the second aspect of the invention, there is provided first according to the second aspect of the invention provides non-volatile RAM Method, including:According to the more newly-generated first kind frame of the volatile storage area to host accessible, wherein the volatibility is deposited Storage area domain is as the non-volatile RAM provided to main frame;Use the part generation the of the volatile storage area block of host accessible Two class frames, wherein volatile storage area include multiple volatile storage area blocks;Stored on NVM generation first kind frame and Second class frame, wherein the first kind frame composition first kind frame chained list of the volatile storage area block, and the volatile storage Second class frame of region unit forms the second class frame chained list.
According to the third aspect of the invention we, there is provided first according to the third aspect of the invention we rebuilds non-volatile RAM Method, including:Obtain the first kind frame of volatile storage area block and the storage location of the second class frame;Reading belongs to described volatile Property storage region block multiple first kind frames and multiple second class frames;The volatibility is rebuild using the multiple first kind frame to deposit Store up region unit;And the volatile storage area block is updated using the multiple second class frame, wherein, wherein the volatibility Storage region includes multiple volatile storage area blocks as the non-volatile RAM provided to main frame, and volatile storage area.
According to the fourth aspect of the invention, there is provided daily record of first according to the fourth aspect of the invention based on FTL tables Update method, including:It is determined that the first FTL blocks of renewal, wherein the first FTL blocks are by full storage to NVM, and belong to first The last FTL frames of FTL blocks have the first address, and the initial daily record frame for belonging to the first FTL blocks has the second address;Record away from 3rd address of the nearest daily record frame for belonging to the first FTL blocks for being written into NVM of current time;Use the portion of the first FTL blocks It is mitogenetic into FTL frames;Record the logical address and physical address generation daily record frame corresponding to current operation request;By FTL frames and day Will frame writes NVM;In response to anomalous event occur, when anomalous event occurs, away from current time recently be written into NVM's Belong to the 5th address of the daily record frame of the first FTL blocks, if the first FTL blocks are starting not yet by full storage again to NVM The first address, the second address and the 5th address are recorded in page.
Daily record update method of first according to the fourth aspect of the invention based on FTL tables, there is provided according to the present invention's Daily record update method of the second of fourth aspect based on FTL tables, wherein, occur in response to anomalous event, if the first FTL blocks By full storage again to NVM, and belong to the 4th address that has of the last FTL frames for the first FTL blocks being stored again, belong to There is the 5th address in the last daily record frame for the first FTL blocks being stored again, the 4th address, the 3rd are recorded in start page Address and the 5th address.
Daily record update method of first or second according to the fourth aspect of the invention based on FTL tables, there is provided according to this Daily record update method of the 3 of the fourth aspect of invention based on FTL tables, wherein, belonging to the daily record number of frames of the first FTL blocks More than threshold value, either predetermined time cycle or the idle storage space in daily record memory block are less than threshold value, or in response to The instruction of user, it is determined that the first FTL blocks of renewal.
Daily record update method of first, second or third according to the fourth aspect of the invention based on FTL tables, there is provided root According to the 4th daily record update method based on FTL tables of the fourth aspect of the present invention, plurality of FTL blocks are arrived by full storage During NVM, the first FTL blocks of renewal are determined according to the priority according to multiple FTL blocks.
According to the fifth aspect of the invention, there is provided daily record of first according to the fifth aspect of the invention based on FTL tables Generating means, including:Address logging modle, for recording logical address corresponding to operation requests and physical address;Daily record frame is given birth to Into module, for according to the logical address corresponding to operation requests and physical address generation daily record frame;FTL frame generation modules, use In generating FTL frames using the part of the first FTL blocks, wherein FTL tables include multiple FTL blocks;Memory module, for being deposited on NVM Store up generation FTL frames and daily record frame, wherein the first FTL blocks multiple daily record frames composition daily record frame chained list and described first Multiple FTL frames composition FTL frame chained lists of FTL blocks.
According to the sixth aspect of the invention, there is provided daily record of first according to the sixth aspect of the invention based on FTL tables Updating device, including:FTL block determining modules, for determining to update the first FTL blocks, wherein the first FTL blocks are arrived by full storage NVM, and belong to the last FTL frames of the first FTL blocks has the first address, and belong to the initial daily record frame tool of the first FTL blocks There is the second address;Record the 3rd address away from the nearest daily record frame for belonging to the first FTL blocks for being written into NVM of current time; FTL frame generation modules, for generating FTL frames using the part of the first FTL blocks;Daily record frame generation module, for recording current behaviour Corresponding logical address is asked to generate daily record frame with physical address;NVM writing modules, for FTL frames and daily record frame to be write Enter NVM;Exception processing module, it is nearest away from current time when anomalous event occurs for occurring in response to anomalous event The 5th address of the NVM daily record frame for belonging to the first FTL blocks is written into, if the first FTL blocks are not yet by full storage again To NVM, the first address, the second address and the 5th address are recorded in page is started.
According to the seventh aspect of the invention, there is provided the first solid state hard disc according to the seventh aspect of the invention, including control Device processed, NVM, random access storage device;Controller is respectively coupled to NVM and random access storage device;NVM include log area with User data area;Solid state hard disc daily record is stored in log area;User data is stored in user data area;Wherein in memory FTL tables are stored with, the FTL tables include multiple FTL blocks;Wherein described controller is used to perform the first party according to the present invention Face, second aspect, the method for the third aspect or fourth aspect.
According to the eighth aspect of the invention, there is provided a kind of program including program code, when be loaded into storage device and When being performed in storage device, described program code make the storage device perform according to a first aspect of the present invention based on FTL tables Daily record generation method.
According to the ninth aspect of the invention, there is provided a kind of program including program code, when be loaded into storage device and When being performed in storage device, the offer that described program code makes the storage device perform according to a second aspect of the present invention is non-volatile RAM method.
According to the tenth aspect of the invention, there is provided a kind of program including program code, when be loaded into storage device and When being performed in storage device, the reconstruction that described program code makes the storage device perform according to a third aspect of the present invention is non-volatile RAM method.
According to the eleventh aspect of the invention, there is provided a kind of program including program code, when being loaded into storage device simultaneously When performing on a storage device, described program code make the storage device perform according to a fourth aspect of the present invention based on FTL The daily record update method of table.
From above technical scheme, a kind of daily record update method proposed by the present invention and device, following technology is obtained Effect:
1st, the daily record update method that the application proposes, by when daily record frame is long, being carried out more to the FTL blocks of log area Newly, the occupancy to log area memory space is reduced, and effectively improves the speed of journal recovery.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments described in application, for those of ordinary skill in the art, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is the structural representation of solid storage device in the prior art;
Fig. 2 is the structured flowchart of solid state hard disc daily record according to an embodiment of the invention;
Fig. 3 is the structured flowchart of FTL tables according to an embodiment of the invention;
Fig. 4 is the structured flowchart of " writing " daily record according to an embodiment of the invention
Fig. 5 is the flow chart of solid state hard disc daily record generation method according to an embodiment of the invention;
Fig. 6 is the structured flowchart of solid state hard disc daily record according to another embodiment of the invention;
Fig. 7 is the flow chart of solid state hard disc daily record generation method according to still another embodiment of the invention;
Fig. 8 is the flow chart according to an embodiment of the invention that FTL table methods are rebuild using daily record;
Fig. 9 is the block diagram of solid state hard disc according to embodiments of the present invention;
Figure 10 is the schematic diagram that solid state hard disc daily record is generated in response to power loss event according to embodiments of the present invention;
Figure 11 A are the schematic diagrames updated according to the FTL blocks of further embodiment of this invention;
Figure 11 B are the schematic diagrames of FTL blocks renewal according to another embodiment of the present invention;
Figure 12 is the block diagram according to the solid state hard disc of still another embodiment of the present invention;
Figure 13 is the structured flowchart of non-volatile RAM daily record according to an embodiment of the invention;
Figure 14 is the structured flowchart of non-volatile RAM daily record according to another embodiment of the invention;
Figure 15 is the flow chart of solid state hard disc daily record generation method according to still another embodiment of the invention;And
Figure 16 is the flow chart of equipment starting method according to an embodiment of the invention.
Embodiment
The application proposes a kind of daily record update method, by when daily record frame is long, being carried out more to the FTL blocks of log area Newly, the occupancy to log area memory space is reduced, and effectively improves the speed of journal recovery.
Certainly, all advantages that any technical scheme of the application must be not necessarily required to reach the above simultaneously are implemented.
In order that those skilled in the art more fully understand the technical scheme in the application, below in conjunction with the embodiment of the present application In accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only Only it is some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, ordinary skill The every other embodiment that personnel are obtained, it should all belong to the scope of the application protection.
Further illustrate that the application implements with reference to illustrations.
Fig. 2 is the structured flowchart of solid state hard disc daily record according to an embodiment of the invention.In order to be opened in solid state hard disc When dynamic, FTL tables can be quickly rebuild, and reduce unnecessary FTL block writes, are provided according to an embodiment of the invention solid State hard disk daily record 210.Solid state hard disc daily record 210 is stored in non-volatile memory medium.Referring to Fig. 2, solid state hard disc daily record 210 is wrapped FTL frames 1-1 (220), FTL frames 1-2 (221) ... FTL frames 2-3 (225) are included, solid state hard disc daily record 210 also includes daily record frame 230 ... daily record frames 235.FTL frames are the parts of FTL blocks, and in the example in figure 2, FTL blocks 1 include 3 FTL frames, by FTL frame 1-1, FTL frame 1-2 and FTL frames 1-1 is formed.Daily record frame 0-1 (230) is first for FTL blocks 0 (not shown in Fig. 2) Individual daily record frame, daily record frame 1-1 (231) are first daily record frames for FTL blocks 1, and daily record frame 1-3 (232) is to be used for FTL blocks 1 The 2nd daily record frame, daily record frame 1-3 (235) is the 3rd daily record frame for FTL blocks 1, and daily record frame 2-1 (233) is FTL blocks 2 The 1st daily record frame, daily record frame 4-1 (234) is first daily record frame for FTL blocks 4.Recorded in the metadata of daily record frame Information, to indicate the FTL blocks belonging to the daily record frame.And alternatively, in daily record frame (for example, daily record frame 1-3 (232)) first number The previous daily record frame that also record belongs in the daily record frame of identical FTL blocks in is (for example, daily record frame 1-3 (232) and daily record frame 1-1 (231) FTL blocks 1 are belonged to, and daily record frame 1-3 (232) previous daily record frame is daily record frame 1-1 (231)).In Fig. 2 embodiment In, FTL blocks occupy continuous physical address space (alternatively, skipping bad block) in solid state hard disc.Alternatively, in solid state hard disc Daily record memory block is provided with non-volatile memory medium, FTL blocks are stored in the continuation address space of daily record memory block.FTL frames The Physical Page of non-volatile memory medium is occupied with daily record frame, so as in a write operation, by the combination of FTL frames and daily record frame Write non-volatile memory medium.
According to one embodiment of present invention, non-volatile memory medium is MLC (Multi Level Cell, multistage Unit) or TLC (Triple Level Cell, three-level unit) non-volatile memory medium, solid state hard disc daily record storage is arrived non-easy When losing the data page of storage medium, pSLC (pseudo-SLC, pseudo- SLC) patterns or SLC (Single Level Cell, list are used Level unit) mode access non-volatile memory medium, to accelerate solid state hard disc daily record storing process and to obtain higher data reliable Property.As another embodiment, solid state hard disc daily record is stored in SLC non-volatile memory mediums.In still another implementation In example, solid state hard disc daily record is stored in the LSB page of MLC non-volatile memory mediums.
Quantity corresponding to the daily record frame of each FTL blocks can be different.Referring to Fig. 2, it is not present within a period of time Renewal to FTL blocks 3, thus the daily record frame for corresponding to FTL blocks 3 is not present in solid state hard disc daily record 210.And exist to FTL The multiple renewal of block 1, thus all renewals recorded with 3 daily record frames (231,232,235) to FTL blocks 1 operate.
In the embodiment of fig. 2, the sequential storage of memory address of the FTL blocks in FTL tables is pressed in solid state hard disc daily record 210 FTL blocks (for example, FTL blocks 2 store after FTL blocks 1), and by the journal daily record frame of daily record frame generation.Each daily record frame Belong to and only belong to a FTL block.In one example, caching belongs to " writing " journal entries of each FTL blocks in internal memory. When belonging to " writing " journal entries of some FTL block and filling up a daily record frame, daily record frame is write into solid state hard disc daily record.
In this way, FTL tables can only need to preserve a complete documentation in solid state hard disc daily record, and in solid state hard disc day Each renewal of the record to FTL list items in will.When FTL entry updatings do not occur, without FTL tables are recorded in into solid state hard disc again In daily record, so as to save system resource.When FTL entry updatings occur, will only daily record frame be recorded in the modification of FTL list items In, reduce the write-in data volume of solid state hard disc daily record.
Using solid state hard disc daily record 210, FTL tables can be rebuild.Due to reasons such as storage device power down, the FTL in internal memory Table disappears, it is necessary to read solid state hard disc daily record 210 and rebuild FTL tables.To rebuild FTL tables, non-volatile in solid state hard disc is deposited In storage media, storage address (physical address) of each FTL blocks in solid state hard disc is also stored, and belong to each FTL blocks The physical address (physical address for alternatively, also storing the earliest daily record frame for belonging to each FTL blocks) of last daily record frame.
When rebuilding FTL tables, as an example, the FTL frames of the FTL blocks 1 stored in non-volatile memory medium are obtained solid Physical address in state hard disk daily record 210, and read (including FTL frame 1-1, FTL frames of the FTL blocks 1 in solid state hard disc daily record 210 1-2 and FTL frame 1-3).Next, obtain the thing for the last daily record frame (referring to Fig. 2, daily record frame 1-3 (235)) for belonging to FTL blocks 1 Address is managed, and according to the backward for the journal entries that address arrangement is pressed in daily record frame 1-3 (235), to remember in daily record frame 1-3 (235) The corresponding FTL entries in FTL blocks 1 in the journal entries renewal internal memory of record.As an example, FTL blocks are updated with journal entries The implication of corresponding entry includes, using the logical address of journal entries as index accesses FTL blocks, and with the physical address of journal entries Replace the physical address for the FTL entries being indexed in FTL blocks.Due to updating FTL blocks 1 according to daily record frame 1-3 (235) backward, And the posterior journal entries in position contain the posterior renewal to FTL entries in daily record frame 1-3 (235), thus rebuilding FTL During table, renewal is only needed once to each FTL entries.For this purpose, further, also mark the FTL bars being updated Mesh so that during FTL tables are rebuild, be no longer updated to the FTL entries being updated.With daily record frame 1-3 (235) more After new FTL blocks 1, obtain and belong to the previous daily record frame of FTL blocks 1 (referring to Fig. 2, daily record frame 1-2 with daily record frame 1-3 (235) (232));Until by all daily record frames of FTL blocks 1 (FTL frames 1-1 (231), FTL frames 1-2 (232) and FTL frames 1-3 (235)) all FTL blocks 1 are updated, or all entries of FTL blocks 1 are all updated.As an example, have recorded in daily record frame 1-3 (235) same Belong to the address of the previous FTL frames 1-2 (232) of FTL blocks 1.
As another citing of the present invention, to rebuild FTL tables, the FTL blocks 1 that are stored in non-volatile memory medium are obtained Physical address of the FTL frames in solid state hard disc daily record 210, and read (including the FTL frames of the FTL blocks 1 in solid state hard disc daily record 210 1-1, FTL frame 1-2 and FTL frame 1-3).Next, the first daily record frame for belonging to FTL blocks 1 is obtained (referring to Fig. 2, daily record frame 1-1 (231) physical address), and according to the order for the journal entries that address arrangement is pressed in daily record frame 1-1 (231), with daily record frame 1-1 (231) the corresponding FTL entries in FTL blocks 1 in the journal entries renewal internal memory of record.As another citing, with daily record bar The implication of the corresponding entry of mesh renewal FTL blocks includes, and using the logical address of journal entries as index accesses FTL blocks, and uses daily record The physical address of entry replaces the physical address for the FTL entries being indexed in FTL blocks.Due to according to the suitable of daily record frame 1-1 (231) Sequence renewal FTL blocks 1, thus during FTL tables are rebuild, FTL blocks need to be updated with each journal entries.With daily record frame After 1-1 (231) renewals FTL blocks 1, obtain with daily record frame 1-1 (231) belong to FTL blocks 1 latter daily record frame (referring to Fig. 2, Daily record frame 1-2 (232));Until by all daily record frames of FTL blocks 1 (FTL frames 1-1 (231), FTL frames 1-2 (232) and FTL frames 1- 3 (235)) all update and arrive FTL blocks 1.As an example, the next FTL for belonging to FTL blocks 1 is have recorded in daily record frame 1-1 (231) Frame 1-2 (232) address.
Fig. 3 is the structured flowchart of FTL tables according to an embodiment of the invention.FTL tables include multiple FTL table clauses (or List item).In one embodiment, corresponding pass of the logical page address with a Physical Page is have recorded in each FTL table clauses System.In yet another embodiment, the corresponding relation of logical block address and physical block address is have recorded in each FTL table clauses. Still in another embodiment, record logical block address and the mapping relations of physical block address in FTL tables, and/or logical page (LPAGE) Location and the mapping relations of physical page address.In still another embodiment, FTL table organizations are tree construction.
In still another embodiment, FTL tables are stored in continuous memory address space, in each FTL table clauses Recording physical address, and the logical address corresponding to physical address is represented with the memory address of each FTL table clauses itself.FTL The quantity of table clause corresponds to the size of solid storage device logical address space.
It is data frame by FTL table organizations to store the purpose of FTL tables in non-volatile memory medium.Referring to Fig. 3, FTL Table (310) includes FTL frames 1, FTL frames 2, FTL frames 3 ... FTL frames 600.Each FTL frames, including multiple FTL table clauses.Each The size of FTL frames is corresponding (for example, page) with the minimum write-in unit of non-volatile memory medium.The data of non-volatile memory medium Page is typically sized to 2KB, 4KB, 8KB or 16KB.In one embodiment, the data page size of non-volatile memory medium is 16KB, and FTL frame signs are 2KB, 4KB or 8KB.In another embodiment, the data page size of non-volatile memory medium is 4KB, and FTL frame signs are 512B, 1KB or 2KB.Usually, FTL frame signs are selected so that the data of non-volatile memory medium Page size is the integral multiple of FTL frame signs, in order to which the storage of multiple FTL frames to be arrived to the data page for non-volatile memory medium. In one example, FTL frames 1 that FTL tables include, FTL frames 2, FTL frames 3 ... FTL frames 600 are continuous by memory address in internal memory Storage.
In an embodiment according to the present invention, FTL tables (310) are also organized as FTL blocks.FTL blocks include multiple FTL frames, Preferably, including the continuous multiple FTL frames of memory address.In the example in figure 3, FTL blocks 1 (320) include 100 FTL frames (FTL frames 1 arrive FTL frames 100), FTL blocks 2 (321) arrive FTL frames 200 including FTL frames 101, and FTL blocks 6 (325) include FTL frames 501 arrive FTL frames 600.As an example, FTL frame signs are 4KB, including the individual FTL entries of 1K (1024), and each FTL entries are corresponding 4KB logical/physical address spaces, thus each FTL frames correspond to 4MB logical/physical address spaces, and each FTL blocks include 100 FTL frames, 400MB logical/physical address spaces are corresponded to.
In solid storage device processing write requests, for the write request allocated physical address, and record this in FTL tables and write The logical address of request and the corresponding relation of physical address.In another embodiment, by the main frame of access solid storage device FTL tables are safeguarded, when needing to send write request to solid-state storage, the physical address of solid storage device is distributed for the write request, And the logical address of the write request and the corresponding relation of physical address are recorded in FTL tables.
Fig. 4 is the structured flowchart of " writing " daily record according to an embodiment of the invention.In solid storage device processing write requests When, also generate " writing " daily record.Logical address corresponding to write operation and physical address are have recorded in " writing " daily record.For each The renewal request of FTL list items, generates and " writes " journal entries corresponding to one.
In order to store the purpose of " writing " daily record in non-volatile memory medium, daily record " will be write " and be organized as (the ginseng of daily record frame 410 See Fig. 4).Each daily record frame 410 includes multiple " writing " journal entries (422,424,42n) (or " list item ").Each " write " day Will entry (422,424 or 42n) includes a logical address and corresponding physical address.According to reception FTL table quilts The sequencing generation of renewal simultaneously organizes " writing " journal entries in daily record frame.Thus in " writing " daily record, it is understood that there may be have " writing " journal entries of same logical address and/or physical address.
The size of each daily record frame 410 is corresponding (for example, page) with the minimum write-in unit of non-volatile memory medium.It is non-easy The data page for losing storage medium is typically sized to 2KB, 4KB, 8KB or 16KB.In one embodiment, non-volatile memory medium Data page size is 16KB, and daily record frame sign is 2KB, 4KB, 8KB or 16KB.In another embodiment, non-volatile memory The data page size of medium is 4KB, and daily record frame sign is 512B, 1KB or 2KB or 4KB.Usually, daily record frame sign is selected, So that the data page size of non-volatile memory medium is the integral multiple of daily record frame sign, in order to which one or more daily record frames are deposited Store up the data page of non-volatile memory medium.In yet another embodiment, one or more FTL frames and one or more " writing " days Will data frame forms a data page of non-volatile memory medium.
Also include metadata 440 in daily record frame 410 according to embodiments of the present invention, daily record is indicated in metadata 440 Frame 410 belongs to FTL blocks 1.Daily record frame 410 belongs to FTL blocks 1, it is meant that the entry in daily record frame 410 have recorded the bar to FTL blocks 1 Purpose updates, and in other words, the logical address of the entry in daily record frame 410 is in the ranges of logical addresses of FTL blocks 1.
In one example, there is provided queue accommodates " writing " journal entries.When " writing " daily record is generated, by journal entries Insert queue (tail of the queue).Alternatively, multiple entries are combined and insert queue in an internal storage access operates, combined is multiple The size of entry can be equal to highway width or memory interface width.In journal entries are taken out from team's head of queue, by daily record Frame sign takes out the journal entries specified number.Queue is first in first out, so that can hold in solid state hard disc daily record The genesis sequence of journal entries easy to identify.The depth of appropriate selection queue so that when power down occurs, in stand-by power supply power supply In finite time, the journal entries in queue can be written to solid state hard disc daily record.
In another example, there is provided daily record frame buffer zone accommodates " writing " journal entries.Daily record frame buffer zone have pair Should be in the size of one or more daily record frames.The size of appropriate selection buffering area so that when power down occurs, supplied in stand-by power supply In the finite time of electricity, the journal entries in daily record frame buffer zone can be written to solid state hard disc daily record.When daily record frame buffers When area have accumulated the data of daily record frame sign, its content is written in solid state hard disc daily record.
In further example, when adding " writing " journal entries to queue or daily record frame buffer zone, also check for queue or In buffering area whether the existing entry with same logical address.If it be have recorded in queue or buffering area with identical The entry of logical address, the then journal entries that use to be write update the existing entry in queue or buffering area, write so as to reduce Enter the data volume of solid state hard disc daily record.
As shown in figure 5, it is the flow of the solid state hard disc daily record generation method according to an embodiment of the invention based on FTL tables Figure.When updating FTL tables, the logical address for the FTL list items being updated and the corresponding relation (510) of physical address are recorded.It is optional Ground accordingly updates FTL tables.The corresponding relation of the recorded logical address of caching and physical address, each logical address and physics The corresponding relation of address, form " a writing " journal entries.Certain amount " writes " journal entries and forms a daily record frame.Same What " writing " journal entries in daily record frame recorded is the renewal to the FTL entries of identical FTL blocks.When caching it is a plurality of logically When the corresponding relation of location and physical address can form a daily record frame, a plurality of logical address and physical address of caching are utilized Corresponding relation generation daily record frame (520).Also select the part generation FTL frames of one of multiple FTL blocks of FTL tables in internal memory (530).For example, selected FTL frames 1-1 is the part for being not yet written to non-volatile memory medium of FTL blocks 1.Preferred In embodiment, the size of FTL frames 1-1 (220) and the combination of daily record frame (230) corresponds to the non-volatile memory medium of solid state hard disc Data page size, so as to by the write operation of a non-volatile memory medium by FTL frames 1-1 (220) and daily record frame (230) Combination write-in solid state hard disc non-volatile memory medium (540).
According to still another embodiment of the invention, the write request of predetermined quantity is often received, generates a daily record frame, wherein The mapping relations of the logical address and physical address corresponding to the write request of the predetermined quantity can be accommodated in one daily record frame.And A daily record frame is often generated, then selects the part generation FTL frames of FTL tables.According to still another embodiment of the present invention, cycle Ground utilizes " writing " journal entries cached to generate daily record frame.And often generate a daily record frame, then select the part life of FTL tables Into FTL frames.According to still another embodiment of the present invention, the size of daily record frame corresponds to the data page of non-volatile memory medium Size, the size of FTL frames also correspond to the data page size of non-volatile memory medium.
According to still another embodiment of the present invention, when generating the FTL frames of FTL tables, by the FTL blocks memory address of itself And the parts of FTL blocks is selected to generate FTL frames.
For example, part of the 1 interior length since address 0 of selection FTL blocks for L FTL blocks, to form FTL frames 1-1.Choosing The part for the FTL blocks that the length in FTL blocks 1 since the L of address is L is selected, to form FTL frames 1-2.Select in FTL blocks 1 from address (N-1) length that * L start is the part of L FTL blocks, to form FTL frames 1-N.Successively by each FTL blocks FTL frames of FTL tables And write non-volatile memory medium so that complete FTL tables are able to record in solid state hard disc daily record.
In this way, a Physical Page is stored to solid state hard disc every time., also can be in stand-by power supply even if solid state hard disc power down In the limited working time, the storage of FTL tables is completed.
One of ordinary skill in the art be will realize in some cases, and complete FTL tables are not included in solid state hard disc daily record. For example, generated for new or blank solid state hard disc, with the use to solid state hard disc, the part of 3 selection FTL tables Power down occurs after FTL frames, now, only FTL blocks 1 are effective in FTL tables, and FTL blocks 1 are only have recorded in solid state hard disc daily record.It is logical Cross in solid state hard disc daily record and mark the data block used and/or untapped data block, and identify in solid state hard disc day Valid data frame in will, FTL tables during so as to rebuild solid state hard disc power down.
Fig. 6 is the structured flowchart of solid state hard disc daily record according to another embodiment of the invention.Solid state hard disc daily record 610 It is stored in non-volatile memory medium.Referring to Fig. 6, solid state hard disc daily record 410 include multiple Physical Page (Physical Page 620,621, 622……628、629).Physical Page 620 includes FTL frames 1-1, FTL frame 1-2, FTL frame 1-3 and daily record frame 0-1.FTL frames with Daily record frame has identical size.FTL frame 1-1, FTL frame 1-2 ... FTL frames 1-100 contains all FTL bars of FTL blocks 1 Mesh, daily record frame 1-1, daily record frame 1-2 and daily record frame 1-3 are the daily record frames for belonging to FTL blocks 1.Solid state hard disc daily record 610 also includes it The frame (other frames 1, other frames 2 and other frames 3) of his type.
Each FTL frames also include metadata, have recorded the FTL blocks belonging to the FTL frames and belong to the previous of same FTL blocks The storage location (physical address) of individual FTL frames.Chained list is organized into so as to belong to multiple FTL frames of same FTL blocks.Each daily record Frame also includes metadata, have recorded the FTL blocks belonging to the daily record frame and belongs to the storage of the previous daily record frame of same FTL blocks Position (physical address).Chained list is organized into so as to belong to multiple daily record frames of same FTL blocks.
In the example of fig. 6, FTL frames 1-1 is first FTL frame of FTL blocks 1, and FTL frames 1-2 is the 2nd of FTL blocks 1 FTL frames, by that analogy, FTL frames 1-100 are last FTL frames of FTL blocks 1.The multiple FTL frames for belonging to same FTL blocks can be with The discontinuous storage in solid state hard disc daily record 610.When the other types frame for having high priority occurs, can be deposited in time Store up solid state hard disc daily record.Daily record frame 0-1 is first daily record frame for FTL blocks 0 (not shown in Fig. 6), and daily record frame 1-1 is For first daily record frame of FTL blocks 1, daily record frame 1-2 is the 2nd daily record frame for FTL blocks 1, and daily record frame 1-3 is to be used for 3rd daily record frame of FTL blocks 1.Entry in daily record frame is arranged by the order of generation.
Fig. 7 is the flow chart of solid state hard disc daily record generation method according to still another embodiment of the invention.According to Fig. 7 reality Example is applied, generates solid state hard disc daily record 610 as shown in Figure 6.
When updating FTL tables, the logical address for the FTL list items being updated and the corresponding relation (710) of physical address are recorded. Alternatively accordingly update FTL tables.The corresponding relation of the recorded logical address of caching and physical address, each logical address with The corresponding relation of physical address, form " a writing " journal entries.Certain amount " writes " journal entries and forms a daily record frame. What " writing " journal entries in same daily record frame recorded is the renewal to the FTL entries of identical FTL blocks.A plurality of when caching is patrolled When the corresponding relation of volume address and physical address can form a daily record frame, a plurality of " writing " the journal entries generation of caching is utilized Daily record frame, and mark in daily record frame the FTL blocks (720) belonging to it (referring to Fig. 6 and Fig. 7, such as daily record frame 0-1).Alternatively, Also mark belongs to the storage location of the previous daily record frame of same FTL blocks with the daily record frame in daily record frame.Referring to Fig. 6, daily record Frame 0-1 is first daily record frame of FTL blocks 0 (not shown in Fig. 6), marks its previous daily record frame not deposit in daily record frame 0-1 .
One of multiple FTL blocks of FTL tables in internal memory (for example, FTL blocks 1) is also selected to generate FTL frames (730).By institute One or more FTL frames of generation together write non-volatile memory medium (740) with daily record frame.In the example of fig. 6,3 FTL The combination of frame and 1 daily record frame occupies a Physical Page of non-volatile memory medium.Step 710-740 is repeated, with any time By daily record frame and the write-in solid state hard disc daily record of FTL frames.
In one example, one of FTL blocks (for example, FTL blocks 1) generation FTL frames are selected, and are write completely by FTL blocks 1 Before entering solid state hard disc daily record 610, avoid writing other FTL blocks to solid state hard disc daily record as far as possible, so that FTL blocks are tried one's best intensively It is distributed in solid state hard disc daily record.However, because FTL frames include indicating the metadata of previous FTL frames, thus belong to same The FTL frames of FTL blocks need not in solid state hard disc daily record Coutinuous store.Can be by other kinds of frame (for example, Fig. 6 other frames 1) Or the FTL frames (for example, Fig. 6 FTL frame 2-1) of other FTL blocks are stored between multiple FTL frames of FTL blocks 1.
When electric on a storage device, FTL frames and daily record frame can be read from solid state hard disc daily record 610, to rebuild FTL tables. In one example, by reading complete solid state hard disc daily record 610, find recorded in solid state hard disc daily record 610 it is each FTL blocks and corresponding daily record frame, and determine before storage device power down, the state of FTL tables.In another example, To accelerate FTL table process of reconstruction, the first FTL frames of multiple FTL frames of each FTL blocks are also recorded in non-volatile memory medium And/or the storage location of last FTL frames, and record the first daily record frame of multiple daily record frames of each FTL blocks and/or last day The storage location of will frame.So as to which when electric on a storage device, the FTL frames of each FTL blocks and depositing for daily record frame can be positioned rapidly Storage space is put, and recovers each FTL blocks, without reading complete solid state hard disc daily record 610.
In one embodiment, in response to storage device power down, even if the journal entries lazy weight of caching is to form Daily record frame, the journal entries of caching are also filled to form daily record frame, and write solid state hard disc daily record.And in non-volatile memory medium It is middle to record the first FTL frames of multiple FTL frames and/or the storage location of last FTL frames of each FTL blocks, and record each FTL First daily record frame of multiple daily record frames of block and/or the storage location of last daily record frame.Referring back to Fig. 6, in solid state hard disc day In will, complete documentation 100 FTL frames of FTL blocks 1;Thus, in response to storage device power down, in non-volatile memory medium Record FTL frame 1-1 and/or FTL frames 1-100 storage location, the storage location with daily record frame 1-1 and/or daily record frame 1-3, with Just FTL blocks 1 are recovered from solid state hard disc daily record.And as an example, in power down, not yet 100 FTL of complete documentation FTL blocks 2 Frame, but renewal of the complete documentation to FTL blocks 2 in daily record frame, in the case, without using recording in solid state hard disc daily record 610 FTL frames 2-1, FTL frame 2-2, FTL frame 2-3, FTL frame 2-7, FTL frame 2-8, FTL frame 2-9 rebuild FTL blocks 2, but only make FTL blocks 2 are rebuild with the daily record frame 2-1 for belonging to FTL blocks 2, and other list items for the FTL2 not being recorded in daily record frame 2-1 exist It can be labeled as during reconstruction unallocated.In another example, more parts of complete FTL blocks 2 are have recorded in solid state hard disc daily record 610 (every part of FTL block 2 includes 100 FTL frames) and the FTL blocks 2 of non-complete documentation, in response to storage device power down, and non-volatile The first FTL frames of newest a complete FTL blocks 2 and/or the storage location of last FTL frames are recorded in storage medium, and is used for FTL is rebuild.
Fig. 8 is the flow chart of equipment starting method according to an embodiment of the invention.Can according to the method for Fig. 8 embodiment , can also be by the host implementation of access solid state hard disc to be implemented by solid state hard disc.When the equipment of such as solid state hard disc starts, need Rebuild FTL tables.
In an embodiment according to the present invention, FTL tables are divided into multiple FTL blocks, independently weighed from solid state hard disc daily record Build each FTL blocks.Determine FTL blocks (800) to be reconstructed.For example, rebuild from first FTL BOB(beginning of block).Or estimation storage system By the storage region accessed first (for example, storage region of main frame storage program area) after system startup, and preferentially loading pair Answer the FTL blocks in this partial memory area domain.Or in solid state hard disc (for example, in solid state hard disc daily record) storage it is last or The logical address or corresponding FTL blocks that previous solid state hard disc is accessed first after starting, and the FTL alternatively preferentially rebuild The foundation of block.When electric on solid state hard disc, stored logical address (one or more) or FTL blocks are obtained.In solid state hard disc On store before start after accessed first logical address when, select FTL blocks so that the logical address of selected FTL blocks Scope includes the logical address accessed first.
In another example, the FTL blocks corresponding to I/O request that identification storage device receives (include received IO The FTL blocks of the asked logical address of request), and preferentially load this part FTL blocks.
Still in another example, after equipment starts, FTL tables are rebuild by the order of FTL block address.Work as reconstruction During to FTL blocks 3, the I/O request of the logical address of the corresponding FTL blocks 5 of access from main frame is received, then pause is to FTL blocks 3 Reconstruction operation, start the reconstruction to FTL blocks 5, after the completion of the reconstruction of FTL blocks 5, the I/O request is responded, in being then further continued for previously Disconnected FTL table order reconstruction operations.
Still in another example, after equipment starts, FTL tables are rebuild in a manner of prediction, when predicting down One when by accessed FTL blocks being FTL blocks 2, is rebuild to FTL blocks 2.If it is corresponding at this moment to receive the access from main frame The I/O request of the logical address of FTL blocks 5, then pause start the reconstruction to FTL blocks 5, in FTL blocks 5 to the reconstruction operation of FTL blocks 2 After the completion of reconstruction, the I/O request is responded, then predicts FTL blocks to be reconstructed again, and carry out reconstruction operation.
To rebuild FTL blocks, obtained from the precalculated position in non-volatile memory medium and specify FTL blocks (such as FTL blocks 1) The storage location (810) of FTL frames and/or daily record frame (if present) in solid state hard disc daily record.According to one embodiment of present invention, The storage location of last 1 FTL frame of FTL blocks 1, and last 1 daily record frame of FTL blocks 1 are recorded in non-volatile memory medium Storage location.
FTL frames are read from the storage location of last 1 FTL frame of FTL blocks 1, and from the FTL frames read 1 before acquisition Individual FTL storage location, and preceding 1 FTL frame is read, in this way, read from solid state hard disc daily record and belong to FTL blocks 1 All FTL frames (820).And if in the presence of the daily record frame for belonging to FTL blocks, the storage position also from last 1 daily record frames of FTL blocks 1 Put and read daily record frame, the storage location of 1 daily record frame before being obtained from the daily record frame read, in this way from solid state hard disc day All daily record frames for belonging to FTL blocks 1 are read in will.
By each FTL frames of reading, by it, the position in FTL blocks 1 writes the part that internal memory is used as FTL blocks 1.It will belong to All FTL frames of FTL blocks 1 are put into internal memory, to form the substance of FTL blocks 1 (830).If next, in the presence of belonging to FTL blocks 1 Daily record frame, also the FTL blocks 1 in internal memory are updated with daily record frame, to complete reconstruction (840) to FTL blocks 1.With daily record frame more New FTL blocks 1 need to follow the order specified.For example, the backward of order is generated by the journal entries in daily record frame to update FTL Block 1.First, the last 1 daily record frame for belonging to FTL blocks 1 is obtained from solid state hard disc daily record, will be more in last daily record frame Individual journal entries are by sequential update from back to front to FTL blocks 1.It is with the implication of journal entries renewal FTL blocks, with daily record bar Logical address in mesh replaces the physical address for being indexed entry in FTL blocks 1 as index.Belong to FTL next, obtaining The penultimate daily record frame of block 1, and update FTL blocks 1 with journal entries therein.
Due to there may be multiple entries with same logical address in journal entries, and it is last in these entries Entry describes the what be new of corresponding FTL entries, to avoid substituted for newly by the old content of FTL entries when updating FTL blocks 1 Content.For this purpose, during FTL blocks 1 are rebuild, mark is set to the FTL entries that each is updated, in subsequent reconstruction During, if treating mark in the FTL entries of journal entries renewal be present, ignore the journal entries (that is, without using the daily record Entry updates FTL blocks).And after all daily record frames of FTL blocks 1 have been handled, remove all marks being set of FTL blocks 1.
As another embodiment of the present invention, order is generated by the journal entries in daily record frame to update FTL blocks 1, it is first First, the first daily record frame for belonging to FTL blocks 1 is obtained from solid state hard disc daily record, multiple journal entries in the first daily record frame are pressed Sequential update from front to back is to FTL blocks 1.With journal entries renewal FTL blocks implication be, with journal entries logically The physical address for being indexed entry in FTL blocks 1 is replaced as index in location.Next, obtain the second daily record for belonging to FTL blocks 1 Frame, and update FTL blocks 1 with journal entries therein.
After the completion of the reconstruction of FTL blocks 1, although not yet reconstructing complete FTL tables, to the counterlogic address model of FTL blocks 1 The I/O request enclosed can be responded.
Next, it is determined whether other FTL blocks (850) to be reconstructed also be present.If reconstructed FTL tables is all FTL blocks, system can be completed and start (860).If the FTL blocks do not rebuild still be present, continue step 800 and determine to be reconstructed FTL blocks.
Fig. 9 is the block diagram of solid state hard disc according to embodiments of the present invention.Storage device include controller, nand flash memory, DRAM and NOR flash memory.Controller is respectively coupled to nand flash memory, NOR flash memory and DRAM.Nand flash memory include start page, Log area and user data area.Solid state hard disc daily record according to embodiments of the present invention is stored in log area, in user data area The user data that storage solid state hard disc preserves as storage device.Stored in solid state hard disc daily record from multiple FTL blocks FTL frames and daily record frame.
Store FTL tables in DRAM, in Fig. 9, the part as the FTL tables indicated by shade is the FTL tables being updated Partly (for example, corresponding to FTL frames 1).The daily record frame 1-1 stored in log area and daily record frame 1-2 have recorded FTL tables more Newly.And daily record frame 1-1 also stored for the address of the FTL frames 1 corresponding to it, and daily record frame 1-2 is stored and belonged to FTL frames 1 Previous daily record frame (daily record frame 1-2) address.So as to by resetting daily record frame on the FTL matrix sections indicated by FTL frames 1 The renewal recorded in 1-1 and daily record frame 1-2, can be obtained as the FTL matrix sections indicated by shade.
In the example of figure 9, the FTL frames of each FTL blocks are stored in the startup page of nand flash memory with daily record frame in daily record The address in area.Alternatively, the FTL frames for belonging to same FTL blocks are organized into chained list, and the daily record frame for belonging to same FTL blocks is also organized For chained list, stored in page is started the FTL frames chained lists of each FTL blocks and daily record frame chained list log area first address with tail Location.Or the head node and storage location of the tail node in log area of the FTL frame chained lists of each FTL blocks are stored in page is started, And the head node of daily record frame chained list and storage location of the tail node in log area.
In a further embodiment, multiple startup pages are stored in nand flash memory, for provide start page backup or Start the different editions of page.The storage location of effectively start page is stored also in NOR flash memory (in nand flash memory physically Location).When electric on solid state hard disc, controller obtains the address of effectively start page from NOR flash memory, and is dodged according to the address from NAND Middle acquisition effectively start page is deposited, and then is rebuild according to the FTL frame address and/or daily record frame address for starting page instruction in DRAM FTL tables.
Figure 10 illustrates the schematic diagram that solid state hard disc daily record is generated in response to power loss event according to embodiments of the present invention. In Figure 10 embodiment, solid state hard disc daily record 1010 include Physical Page 1020, Physical Page 1021, Physical Page 1022 ... physics Page 1028 and Physical Page 1029.When power down occurs, Physical Page 1022 has been written to non-volatile memory medium.After a power failure, The limited time of stand-by power supply power supply, for the last state of FTL tables is stored in non-volatile memory medium within the limited time, Change the FTL frames of write-in Physical Page and the ratio of daily record frame, increase the accounting of daily record frame.In Figure 10 example, power down occurs Afterwards, Physical Page 1028 and 1029 is filled up completely with daily record frame, and no longer writes FTL frames, so as to which daily record frame as much as possible be write Enter non-volatile memory medium.
During stand-by power supply is powered, even if being completely written to daily record frame is not written into FTL frames, non-volatile memory Jie can be write The daily record frame of matter is also limited.According to one embodiment of present invention, to ensure that the renewal to FTL tables can be saved To non-volatile memory medium, according to during stand-by power supply is powered, the quantity of the daily record frame of non-volatile memory medium can be write To determine the quantity of the journal entries of caching.For example, if stand-by power supply can be supported N number of daily record frame write-in non-volatile memory being situated between Matter, the then total amount of the journal entries cached are no more than the quantity for the journal entries that N number of daily record frame is accommodated.Further, due to Daily record frame is corresponding with FTL blocks, and the quantity of daily record frame is no more than N.If daily record is filled in N number of daily record frame in internal memory Entry, before one or more write-in non-volatile memory mediums by these daily record frames, suspend the generation of new daily record frame, Yi Jike Selection of land, suspend the response to needing the operation (for example, write order, erasing order, Trim orders etc.) for updating FTL table clauses.
In another embodiment in accordance with the invention, power loss event is not only in response to, also adjusts FTL according to other reasonses The ratio of frame and daily record frame.For example, when write order frequently occurs, more journal entries have been cached in internal memory, have adjusted solid-state The ratio of FTL frames and daily record frame in the Physical Page of hard disk daily record, so that journal entries are write into non-volatile memory medium as early as possible.
Wherein, occur in response to anomalous event, be included in the last FTL tables number that each FTL blocks are stored in NVM startup page Each FTL blocks are stored according to address in NVM of address of the frame in NVM and last daily record frame or in NVM startup page most Physical page address of the FTL tables data frame group in NVM and physical page address of the last daily record frame group in NVM, wherein FTL tables afterwards Data frame group is stored in multiple FTL frames on identical NVM Physical Page, and daily record frame group is stored in identical NVM Physical Page On multiple daily record frames.
Figure 11 A and Figure 11 B are the schematic diagrames updated according to the FTL blocks of further embodiment of this invention.
Referring to Figure 11 A, solid state hard disc daily record 1110 includes multiple Physical Page (Physical Page 1120,1121,1122 ... 1128、1129).Physical Page 1120 includes FTL frames 1-1, FTL frame 1-2, FTL frame 1-3 and daily record frame 1-1.FTL frames and daily record Frame has identical size.FTL frame 1-1, FTL frame 1-2 ... FTL frames 1-6 contains all FTL entries (6 of FTL blocks 1 FTL frames), daily record frame 1-1, daily record frame 1-2 ... daily record frames 1-10 are the daily record frames for belonging to FTL blocks 1.Solid state hard disc daily record 1110 In also include belonging to the frames (for example, belonging to the FTL frames 2 of FTL blocks 2, belonging to the FTL frames 3 of FTL blocks 3) of other FTL blocks.
After Physical Page 1128 is write into non-volatile memory apparatus, daily record frame 1-10 is generated again, and prepare daily record frame 1-10 write-ins non-volatile memory apparatus (referring to Figure 11 A, indicated by " current time ").Selection is now needed from which FTL block Middle generation FTL frames (or other need the data that persistence preserves).In an embodiment according to the present invention, compare and belong to each The quantity of the daily record frame of FTL blocks.In Figure 11 A example, in solid state hard disc daily record 1110, the daily record frame for belonging to FTL blocks 1 has 9, the daily record frame for belonging to FTL blocks 2 has 1.From possessing, FTL frames are generated in the FTL blocks more than daily record frame is favourable.From solid-state , it is necessary to update FTL blocks according to all daily record frames for belonging to the FTL blocks when rebuilding FTL blocks in hard disk daily record.So as to daily record frame Quantity increase can slow down the speed of FTL blocks reconstruction, and the increase of daily record number of frames also results in bigger solid state hard disc daily record Memory space.
Figure 11 A are returned to, at current time, it is determined that FTL frames are generated from FTL blocks 1, to update in solid state hard disc daily record FTL blocks 1.Update the FTL blocks 1 in solid state hard disc daily record, it is meant that existing in solid state hard disc daily record 1110 is included completely In the case of the FTL frames of FTL blocks 1, new FTL blocks 1 are write into solid state hard disc daily record 1110.When new FTL blocks 1 are completely write Enter solid state hard disc daily record 1110, old FTL blocks 1 can be deleted from solid state hard disc daily record.
For the FTL blocks 1 in renewal solid state hard disc daily record, the FTL frames for belonging to FTL blocks 1 are generated from the FTL blocks 1 in internal memory 1-1, FTL frame 1-2 and FTL frame 1-3, together with daily record frame 1-10, Physical Page 1129 is formed, and be written to non-volatile memory medium. Now, need to rebuild FTL blocks 1 if power down occurs, can only by read from solid state hard disc daily record 1110 Physical Page 1120 with Physical Page 1121 obtains FTL frames 1-1 to FTL frame 1-6, to recover FTL blocks 1, and according to daily record frame 1-1 to daily record frame 1-10 come Update FTL blocks 1.Thus, if power down occurs after Physical Page 1129 is written into nonvolatile storage, it is also necessary in non-volatile memory The storage location that record belongs to the last FTL frames of FTL blocks 1 in device is the position of the FTL1-6 in Physical Page 1121, and is belonged to The storage location of the last daily record frame of FTL blocks 1 is the storage location of the daily record frame 1-10 in Physical Page 1129.
Similarly, belong to if power down occurs for " current time " in Figure 11 A, it is necessary to be recorded in nonvolatile storage The storage location of the last FTL frames of FTL blocks 1 is the position of the FTL1-6 in Physical Page 1121, and belongs to the last of FTL blocks 1 The storage location of daily record frame is the storage location of the daily record frame 1-9 in Physical Page 1128, and belongs to the 1st daily record of FTL blocks 1 The storage location of frame is the storage location of the daily record frame 1-1 in Physical Page 1120.In another example, belong to FTL blocks 1 The quantity of FTL frames can be known (for example, 6), so as to which the last FTL frames (FTL1-6) according to FTL blocks 1 trace forward 5 FTL frames belong to all FTL frames of FTL blocks 1 to obtain, the storage location of the 1st FTL frame without recording FTL blocks 1.
Referring to Figure 11 B, all 6 FTL for belonging to FTL blocks 1 have been stored in Physical Page 1129 and Physical Page 1130 Frame.And daily record frame 1-11 have recorded the last daily record updated before write-in Physical Page 1130 to FTL blocks 1.Now, if desired rebuild FTL blocks 1, then FTL frames 1 need to be only read from Physical Page 1129 and Physical Page 1130 to FTL frames 6, and obtained in generation physics Page 1129 is recorded in daily record frame 1-10 and day with the period of Physical Page 1130, the daily record being updated to FTL blocks 1, these daily records In will frame 1-11.So as to which if power down now occur, it is necessary to which record belongs to the last FTL frames of FTL blocks 1 in nonvolatile storage Storage location is the position of the FTL1-6 in Physical Page 1130, and it is thing to belong to the storage location of the last daily record frame of FTL blocks 1 Manage the storage location of the daily record frame 1-11 in page 1130.Further, also record belongs to the storage of the 1st FTL frame of FTL blocks 1 Position is the position of the FTL1-1 in Physical Page 1129, and it is physics to belong to the storage location of the 1st daily record frame of FTL blocks 1 The storage location of daily record frame 1-10 in page 1129.
Now, Physical Page 1120 can be deleted with the FTL frames stored in Physical Page 1121, and daily record frame 1-1 is to daily record Frame 1-9 can also be deleted.These memory spaces can be wiped free of and for storing other data.
To select to generate FTL frames (or other need the data that persistence preserves) from which FTL block, there can be a variety of plans Slightly.FTL blocks correspond to logical address space.Known or identify the frequent situation of the write operation of some logical address spaces Under, FTL blocks corresponding to preferable such logical address space are updated, to reduce the daily record number of frames for these FTL blocks. Or the frequent either read-only zones of read operation that is known or identifying some logical address spaces, can reduce it is such logically The renewal frequency of FTL blocks corresponding to the space of location.In addition to FTL blocks, the method that can also provide according to embodiments of the present invention by Other kinds of data write non-volatile memory apparatus, for example, the bad block table in storage device.Generally, bad block table is believed Breath renewal frequency is relatively low, and the data frame of solid state hard disc daily record is write using lower priority as its generation.In another example some data Reliability requirement it is not high, then can use lowest priority to write the data frame of solid state hard disc daily record for its generation.
Figure 12 is the block diagram of another solid state hard disc according to embodiments of the present invention.Storage device includes controller, NAND dodges Deposit, DRAM and NOR flash memory.Controller is respectively coupled to nand flash memory, NOR flash memory and DRAM.Include starting in nand flash memory Page, log area and user data area.Solid state hard disc daily record according to embodiments of the present invention is stored in log area, in user data The user data that area's storage solid state hard disc preserves as storage device.Stored in solid state hard disc daily record from multiple FTL blocks FTL frames and daily record frame and NVRAM blocks frame and NVRAM daily record frames from multiple NVRAM blocks.
FTL tables are stored in DRAM, and NVRAM is provided by DRAM.NVRAM is the storage in the DRAM of solid state hard disc Area;Main frame can access NVRAM (Non-Volatile RAM, non-volatile RAM) memory block in the way of internal memory is accessed;Although by DRAM provides NVRAM memory blocks, but is non-volatile in main frame NVRAM;By way of similar to record FTL tables, deposit Storage equipment recorded NVRAM blocks and renewal to NVRAM in NVM;So as to which even if power down occur, can also recover from NVM NVRAM content, realize non-volatile characteristic.In the present invention, NVRAM also piecemeals, the piecemeal plan of the strategy and FTL tables of piecemeal It is slightly identical.
In Figure 12, the part as the NVRAM indicated by shade is the NVRAM parts being updated (for example, corresponding to NVRAM blocks 1).NVRAM frames 1, NVRAM frames 2, and (NVRAM) daily record frame 1-1, (NVRAM) daily record are stored in log area Frame 1-2.NVRAM frames 1 constitute NVRAM blocks 1 with NVRAM frames 2, and daily record frame 1-1 and daily record frame 1-2 have recorded to NVRAM's The renewal of NVRAM blocks 1.Alternatively, NVRAM daily records frame 1-1 also stored for the mark of the NVRAM blocks 1 corresponding to it, and NVRAM Daily record frame 1-2 stores the address for the previous NVRAM daily records frame (NVRAM daily records frame 1-1) for belonging to NVRAM blocks 1.By The renewal recorded in NVRAM daily record frame 1-1 and NVRAM daily record frames 1-2 is reset on NVRAM blocks 1 (or is, with NVRAM daily record frames 1-1 and NVRAM daily record frames 1-2 renewal NVRAM blocks 1), it can obtain as the part of the NVRAM indicated by shade.
In a further embodiment, multiple startup pages are stored in nand flash memory, for provide start page backup or Start the different editions of page.The storage location of effectively start page is stored also in NOR flash memory (in nand flash memory physically Location).When electric on solid state hard disc, controller obtains the address of effectively start page from NOR flash memory, and is dodged according to the address from NAND Middle acquisition effectively start page is deposited, and then according to the NVRAM frame address and/or NVRAM daily record frames of the NVMRAM blocks for starting page instruction Address rebuilds NVRAM in DRAM.
Figure 13 is NVRAM according to an embodiment of the invention structured flowchart.Solid state hard disc daily record 1310 is stored in In non-volatile memory medium.Referring to Figure 13, solid state hard disc daily record 1310 include multiple Physical Page (Physical Page 1320,1321, 1322……1328、1329).Physical Page 1320 includes NVRAM frame 1-1, NVRAM frame 1-2, NVRAM frame 1-3 and NVRAM days Will frame 0-1.NVRAM frames have identical size with NVRAM daily record frames.NVRAM frame 1-1, NVRAM frame 1-2 ... NVRAM frames 1- 100 contain all the elements of NVRAM blocks 1, and NVRAM daily record frame 1-1, NVRAM daily record frame 1-2 and NVRAM daily record frames 1-3 is category In the NVRAM daily record frames of NVRAM blocks 1.Solid state hard disc daily record 1310 also include other kinds of frame (other frames 1, other frames 2 with Other frames 3).In Figure 13 example, the combination of 3 NVRAM frames and 1 NVRAM daily record frame occupies non-volatile memory medium One Physical Page.
Alternatively, each NVRAM frames also include metadata, have recorded and belong to the previous of same NVRAM blocks with the NVM frames The storage location (physical address on non-volatile memory medium) of NVRAM frames.Further, metadata also includes the NVRAM NVRAM blocks belonging to frame.Chained list is organized into so as to belong to multiple NVRAM frames of same NVRAM blocks.Each NVRAM daily record frames Also include metadata, have recorded the NVRAM blocks belonging to the NVRAM daily record frames and belong to the previous NVRAM of same NVRAM blocks The storage location (physical address) of daily record frame.Chained list is organized into so as to belong to multiple NVRAM daily records frames of same NVRAM blocks.
In Figure 13 example, NVRAM frames 1-1 is first NVRAM frame of NVRAM blocks 1, and NVRAM frames 1-2 is NVRAM 2nd NVRAM frame of block 1, by that analogy, NVRAM frames 1-100 are last NVRAM frames of NVRAM blocks 1.Belong to same Multiple NVRAM frames of NVRAM blocks can the discontinuous storage in solid state hard disc daily record 1310.There are other classes of high priority , can be in time by the storage of other types frame into solid state hard disc daily record when type frame occurs.NVRAM daily record frames 0-1 is to be used for NVRAM First NVRAM daily record frame of block 0 (not shown in Figure 13), NVRAM daily record frames 1-1 are first for NVRAM blocks 1 NVRAM daily record frames, NVRAM daily record frames 1-2 are the 2nd NVRAM daily record frames for NVRAM blocks 1, and NVRAM daily record frames 1-3 is to use In the 3rd NVRAM daily record frame of NVRAM blocks 1.Entry in daily record frame is arranged by the order of generation.
Figure 14 is the structured flowchart of NVRAM according to another embodiment of the invention.NVRAM1410 is stored in non-volatile In storage medium.Referring to Figure 14, solid state hard disc daily record 1410 includes multiple Physical Page (Physical Page 1420,1421,1422 ... 1430、1431).Physical Page 1420 includes FTL frames 1-1, FTL frame 1-2, FTL frame 1-3 and daily record frame 0-1.FTL frames and daily record Frame has identical size.Physical Page 1421 includes NVRAM frame 1-1, NVRAM frame 1-2, NVRAM frame 1-3 and NVRAM daily records Frame 0-1.NVRAM frames have identical size with NVRAM daily record frames.NVRAM frame 1-1, NVRAM frame 1-2 ... NVRAM frames 1- 100 contain all the elements of NVRAM blocks 1, and NVRAM daily record frame 1-1, NVRAM daily record frame 1-2 and NVRAM daily record frames 1-3 is category In the NVRAM daily record frames of NVRAM blocks 1.Solid state hard disc daily record 1410 also include other kinds of frame (for example, other frames 1, other Frame 2 and other frames 3).
In Figure 14 example, NVRAM frames 1-1 is first NVRAM frame of NVRAM blocks 1, and NVRAM frames 1-2 is NVRAM 2nd NVRAM frame of block 1, by that analogy, NVRAM frames 1-100 are last NVRAM frames of NVRAM blocks 1.Belong to same Multiple NVRAM frames of NVRAM blocks can the discontinuous storage in solid state hard disc daily record 1410.In Figure 14 example, FTL frames 1-1 is first FTL frame of FTL blocks 1, and FTL frames 1-2 is the 2nd FTL frame of FTL blocks 1, and FTL frames 1-3 is the last of FTL blocks 1 One FTL frame.The multiple FTL frames for belonging to same FTL blocks can the also discontinuous storage in solid state hard disc daily record 1410.When When NVRAM frames are high priority, it is preferentially stored into solid state hard disc daily record 1410, when FTL frames are high priority, by it Preferentially store into solid state hard disc daily record 1410, can also be according to priority when the other types frame for having higher priority occurs Order is stored to solid state hard disc daily record in time.
Figure 15 is the flow chart of solid state hard disc daily record generation method according to still another embodiment of the invention.According to Figure 15's Embodiment, generate solid state hard disc daily record 1310 as shown in fig. 13 that.
When updating NVRAM, the NVRAM access unit address being updated and memory cell content (1510) are recorded.Can Selection of land accordingly updates NVRAM.NVRAM access unit address can be DRAM physical address or the visible NVRAM of main frame Address.The recorded address of caching and memory cell content, it is each to address and memory cell content, form a NVRAM day Will entry.Certain amount NVRAM journal entries form a NVRAM daily record frame.NVRAM journal entries in same daily record frame What is recorded is the renewal to identical NVRAM blocks.When the multipair address of caching can form a NVRAM with memory cell content During daily record frame, NVRAM daily records frame (1520) is generated using a plurality of NVRAM journal entries of caching.Alternatively, in NVRAM daily records The NVRAM blocks belonging to it are marked in frame (referring to Figure 13, such as daily record frame 0-1).Alternatively, also marked in NVRAM daily record frames Belong to the storage location of the previous NVRAM daily records frame of same NVRAM blocks with the NVRAM daily record frames.Referring to Figure 13, NVRAM days Will frame 0-1 is first NVRAM daily record frame of NVRAM blocks 0 (not shown in Figure 13), before marking it in NVRAM daily record frames 0-1 One NVRAM daily record frame is not present.
One of NVRAM multiple NVRAM blocks in internal memory (for example, NVRAM blocks 1) is also selected to generate NVRAM frames (1520).The one or more NVRAM frames generated and NVRAM daily records frame are together write into non-volatile memory medium (1540). Step 1510-1540 is repeated, so that NVRAM daily records frame and NVRAM frames are write into solid state hard disc daily record at any time.
In one example, one of NVRAM blocks (for example, NVRAM blocks 1) generation NVRAM frames are selected, and by NVRAM Block 1 is completely written to before solid state hard disc daily record 1310 (referring to Figure 13), avoids writing the frame of other NVRAM blocks as far as possible to NVRAM Or the frame of other blocks, so that the NVRAM frames of same NVRAM blocks are intensively distributed in solid state hard disc daily record 1310 as far as possible.However, Because NVRAM frames include indicating the metadata of previous NVRAM frames, thus the NVRAM frames for belonging to same NVRAM blocks need not be Coutinuous store in solid state hard disc daily record.Can by other kinds of frame (for example, Figure 13 other frames 1 or Figure 14 FTL frame 1-1) or The NVRAM frames (for example, Figure 13 NVRAM frame 2-1) of other NVRAM blocks are stored between multiple NVRAM frames of NVRAM blocks 1.
When electric on a storage device, NVRAM frames and NVRAM daily record frames can be read from solid state hard disc daily record 1310, with weight Build NVRAM.In one example, by reading complete solid state hard disc daily record 1310, find in solid state hard disc daily record 1310 The each NVRAM frames and corresponding NVRAM daily record frames of record, and determine before storage device power down, NVRAM shape State.In another example, to accelerate NVRAM process of reconstruction, the more of each NVRAM blocks are also recorded in non-volatile memory medium First NVRAM frames of individual NVRAM frames and/or the storage location of last NVRAM frames, and record the multiple of each NVRAM blocks First NVRAM daily records frame of NVRAM daily record frames and/or the storage location of last NVRAM daily records frame.So as on a storage device When electric, the NVRAM frames of each NVRAM blocks and the storage location of NVRAM daily record frames can be positioned rapidly, and recover each NVRAM Block, without reading complete solid state hard disc daily record 1310.
In one embodiment, in response to storage device power down, though the NVRAM journal entries lazy weight of caching with NVRAM daily record frames are formed, also fill the NVRAM journal entries of caching to form NVRAM daily record frames, and write solid state hard disc day Will.And the first NVRAM frames of multiple NVRAM frames of each NVRAM blocks and/or last are recorded in non-volatile memory medium The storage location of NVRAM frames, and record multiple NVRAM daily records frames of each NVRAM blocks the first NVRAM daily records frame and/or The storage location of last NVRAM daily record frames.Referring back to Figure 13, in solid state hard disc daily record 1310, complete documentation NVRAM blocks 1 100 NVRAM frames.Thus, in response to storage device power down, recorded in non-volatile memory medium NVRAM frames 1-1 and/or NVRAM frames 1-100 storage location, the storage location with NVRAM daily record frame 1-1 and/or NVRAM daily record frames 1-3, so as to from admittedly Recover NVRAM blocks 1 in state hard disk daily record 1310.In another example, in power down, not yet complete documentation NVRAM blocks 2 100 NVRAM frames, but all renewals of the complete documentation to NVRAM blocks 2 in NVRAM daily record frames, in the case, without using NVRAM frame 2-1, NVRAM frame 2-2, NVRAM frame 2-3, NVRAM frame 2-7, NVRAM frames 2- recorded in solid state hard disc daily record 1310 8th, NVRAM frames 2-9 rebuilds NVRAM blocks 2, but using only the NVRAM daily record frame 2-1 for belonging to NVRAM blocks 2 rebuilds NVRAM Block 2, and the other parts content for the NVRAM blocks 2 not being recorded in NVRAM daily record frames 2-1 can be labeled as not making when rebuilding With or be set to initial value.In another example, it is (every that more parts of complete NVRAM blocks 2 are have recorded in solid state hard disc daily record 1310 Part NVRAM block 2 includes 100 NVRAM frames) NVRAM blocks 2 with non-complete documentation, in response to storage device power down, and non-easy Lose the storage position of the first NVRAM frames and/or last NVRAM frames that newest a complete NVRAM blocks 2 are recorded in storage medium Put, and for the reconstruction of NVRAM blocks 2.
Figure 16 is the flow chart of equipment starting method according to an embodiment of the invention.According to the method for Figure 16 embodiment It can be implemented by solid state hard disc, can also be by the host implementation of access solid state hard disc.When the equipment of such as solid state hard disc starts, Need to rebuild NVRAM.
In an embodiment according to the present invention, NVRAM is divided into multiple NVRAM blocks, independently rebuild from NVRAM each NVRAM blocks.Determine NVRAM blocks (1600) to be reconstructed.For example, rebuild from first NVRAM BOB(beginning of block).Or estimation storage The region that system is accessed NVRAM after starting first, and preferentially load the NVRAM blocks of this corresponding subregion.At another In example, the NVRAM blocks corresponding to NVRAM access requests that identification storage device receives (have received access request The NVRAM blocks for the address asked), and preferentially load this part NVRAM blocks.
Next obtained from the precalculated position in non-volatile memory medium and specify NVRAM blocks (such as NVRAM blocks 1) The storage location (1610) of NVRAM frames and/or NVRAM daily record frame (if present) in solid state hard disc daily record.According to the present invention's One embodiment, the storage location of last 1 NVRAM frame of NVRAM blocks 1, and NVRAM blocks are recorded in non-volatile memory medium The storage location of 1 last 1 NVRAM daily record frames.
NVRAM frames are read from the storage location of last 1 NVRAM frame of NVRAM blocks 1, and from the NVRAM frames read The storage location of 1 NVRAM frame before acquisition, and preceding 1 NVRAM frame is read, in this way, read from solid state hard disc daily record Belong to all NVRAM frames (1620) of NVRAM blocks 1.And if in the presence of the NVRAM daily record frames for belonging to NVRAM blocks 1, also from NVRAM The storage location of last 1 NVRAM daily record frames of block 1 reads NVRAM daily record frames, is obtained from the NVRAM daily record frames read The storage location of preceding 1 NVRAM daily record frames, read from solid state hard disc daily record belong to all of NVRAM blocks 1 in this way NVRAM daily record frames.
By each NVRAM frames of reading, by it, the position in NVRAM blocks 1 writes the part that internal memory is used as NVRAM blocks 1. All NVRAM frames for belonging to NVRAM blocks 1 are put into internal memory, to form the substance of NVRAM blocks 1 (1630).If next, In the presence of the NVRAM daily record frames for belonging to NVRAM blocks 1, the NVRAM blocks 1 in internal memory also are updated with NVRAM daily records frame, with completion pair The reconstruction (1640) of NVRAM blocks 1.Need to follow the order specified with NVRAM daily records frame renewal NVRAM blocks 1.In an example In, the backward of order is generated by the journal entries in NVRAM daily record frames to update NVRAM blocks 1.First, from solid state hard disc day The last 1 NVRAM daily record frames for belonging to NVRAM blocks 1 are obtained in will, by multiple NVRAM days in last NVRAM daily record frame Will entry presses the sequential update of generation time from back to front to NVRAM blocks 1.With the implication of NVRAM journal entries renewal NVRAM blocks It is, by the use of the address in NVRAM journal entries as index, NVRAM blocks is replaced with the memory cell content of NVRAM journal entries The content for being indexed memory cell in 1.Next, obtaining the penultimate NVRAM daily record frames for belonging to NVRAM blocks 1, it is used in combination NVRAM journal entries renewal NVRAM blocks 1 therein.
After the completion of the reconstruction of NVRAM blocks 1, the NVRAM access requests of the corresponding address scope of NVRAM blocks 1 can be rung Should.
Due to there may be multiple entries with identical address in NVRAM journal entries, and in these entries most Entry describes the what be new of corresponding NVRAM entries afterwards, and the old content by NVRAM entries is avoided when updating NVRAM blocks 1 It substituted for new content.For this purpose, during NVRAM blocks 1 are rebuild, the NVRAM memory cell that each is updated is set Tagging, during subsequent reconstruction, if mark be present in the NVRAM memory cell for treating to be updated by NVRAM journal entries, neglect The slightly NVRAM journal entries (that is, updating NVRAM blocks without using the NVRAM journal entries).And work as and handled NVRAM blocks 1 After all daily record frames, all marks being set of NVRAM blocks 1 are removed.
Next, it is determined whether other NVRAM blocks (1650) to be reconstructed also be present.If reconstructed NVRAM institute There are NVRAM blocks, NVRAM process of reconstruction completes (1660).If the NVRAM blocks do not rebuild still be present, continue step 1600 simultaneously Determine NVRAM blocks to be reconstructed.
It will be understood by those skilled in the art that embodiments herein can be provided as method, apparatus (equipment) or computer Program product.Therefore, in terms of the application can use complete hardware embodiment, complete software embodiment or combine software and hardware Embodiment form.Moreover, the application can use the meter for wherein including computer usable program code in one or more The computer journey that calculation machine usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of sequence product.
The application is the flow chart with reference to method, apparatus (equipment) and computer program product according to the embodiment of the present application And/or block diagram describes.It should be understood that can be by each flow in computer program instructions implementation process figure and/or block diagram And/or square frame and the flow in flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided to refer to The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is made to produce One machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for realizing The device for the function of being specified in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Although having been described for the preferred embodiment of the application, those skilled in the art once know basic creation Property concept, then can make other change and modification to these embodiments.So appended claims be intended to be construed to include it is excellent Select embodiment and fall into having altered and changing for the application scope.Obviously, those skilled in the art can be to the application Various changes and modification are carried out without departing from spirit and scope.So, if these modifications and variations of the application Belong within the scope of the application claim and its equivalent technologies, then the application is also intended to exist comprising these changes and modification It is interior.

Claims (10)

1. a kind of daily record generation method based on FTL tables, including:
Record logical address and physical address corresponding to operation requests;
According to the logical address corresponding to operation requests and physical address generation daily record frame;
FTL frames are generated using the part of the first FTL blocks, wherein FTL tables include multiple FTL blocks;
The FTL frames and daily record frame of generation are stored on NVM, wherein multiple daily record frames composition daily record frame chain of the first FTL blocks Multiple FTL frames composition FTL frame chained lists of table and the first FTL blocks.
2. the daily record generation method based on FTL tables as claimed in claim 1, in addition to:
More newly-generated first kind frame according to the volatile storage area to host accessible;
The second class frame is generated using the part of the volatile storage area block of host accessible, wherein volatile storage area includes Multiple volatile storage area blocks;
The first kind frame and the second class frame of generation are stored on NVM, wherein the first kind frame group of the volatile storage area block Into first kind frame chained list, and the second class frame of the volatile storage area block forms the second class frame chained list.
3. a kind of method that non-volatile RAM is provided, including:
According to the more newly-generated first kind frame of the volatile storage area to host accessible, wherein the volatile storage area As the non-volatile RAM provided to main frame;
The second class frame is generated using the part of the volatile storage area block of host accessible, wherein volatile storage area includes Multiple volatile storage area blocks;
The first kind frame and the second class frame of generation are stored on NVM, wherein the first kind frame group of the volatile storage area block Into first kind frame chained list, and the second class frame of the volatile storage area block forms the second class frame chained list.
4. a kind of method for rebuilding non-volatile RAM, including:
Obtain the first kind frame of volatile storage area block and the storage location of the second class frame;
Read the multiple first kind frames for belonging to the volatile storage area block and multiple second class frames;
The volatile storage area block is rebuild using the multiple first kind frame;And
The volatile storage area block is updated using the multiple second class frame,
Wherein, wherein the volatile storage area is as the non-volatile RAM provided to main frame, and volatile storage area bag Include multiple volatile storage area blocks.
5. a kind of daily record update method based on FTL tables, including:
It is determined that the first FTL blocks of renewal, wherein the first FTL blocks are by full storage to NVM, and belong to the last of the first FTL blocks FTL frames have the first address, and the initial daily record frame for belonging to the first FTL blocks has the second address;
Record the 3rd address away from the nearest daily record frame for belonging to the first FTL blocks for being written into NVM of current time;
FTL frames are generated using the part of the first FTL blocks;
The logical address corresponding to current operation request is recorded with physical address to generate daily record frame;
By FTL frames and daily record frame write-in NVM;
Occur in response to anomalous event, when anomalous event occurs, away from current time recently be written into NVM belong to first The daily record frame of FTL blocks has the 5th address, if the first FTL blocks are remembered not yet by full storage again to NVM in page is started Record the first address, the second address and the 5th address.
6. daily record update method as claimed in claim 5, wherein
Occur in response to anomalous event, if the first FTL blocks by full storage again to NVM, and belong to and are stored again The last FTL frames of the first FTL blocks there is the 4th address, the last daily record frame for belonging to the first FTL blocks being stored again has 5th address, the 4th address, the 3rd address and the 5th address are recorded in page is started.
7. the daily record update method based on FTL tables as described in claim 5-6, wherein, when the daily record frame for belonging to the first FTL blocks Quantity exceedes threshold value, and either predetermined time cycle or the idle storage space when daily record memory block are less than threshold value, or ring Should be in the instruction of user, it is determined that the first FTL blocks of renewal.
8. the daily record update method based on FTL tables as described in one of claim 5-7, plurality of FTL blocks are completely deposited When storing up NVM, the first FTL blocks of renewal are determined according to the priority according to multiple FTL blocks.
9. a kind of daily record updating device based on FTL tables, including:
FTL block determining modules, for determining to update the first FTL blocks, wherein the first FTL blocks are by full storage to NVM, and belong to There is the first address in the last FTL frames of the first FTL blocks, and the initial daily record frame for belonging to the first FTL blocks has the second address;Note Record the 3rd address away from the nearest daily record frame for belonging to the first FTL blocks for being written into NVM of current time;
FTL frame generation modules, for generating FTL frames using the part of the first FTL blocks;
Daily record frame generation module, for recording the logical address corresponding to current operation request and physical address generation daily record frame;
NVM writing modules, for FTL frames and daily record frame to be write into NVM;
Exception processing module, for occurring in response to anomalous event, when anomalous event occurs, away from current time it is nearest by The write-in NVM daily record frame for belonging to the first FTL blocks has the 5th address, if the first FTL blocks are not yet by full storage again To NVM, the first address, the second address and the 5th address are recorded in page is started.
10. a kind of solid state hard disc, including:
Controller, NVM, random access storage device;
Controller is respectively coupled to NVM and random access storage device;
NVM includes log area and user data area;
Solid state hard disc daily record is stored in log area;
User data is stored in user data area;
FTL tables are wherein stored with memory, and the FTL tables include multiple FTL blocks;
Wherein described controller is used to perform the method as described in one of claim 1-8.
CN201610499631.1A 2016-06-29 2016-06-29 Log updating method and device Active CN107544866B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011427464.2A CN112433889B (en) 2016-06-29 2016-06-29 Log generation method and device based on FTL table
CN201610499631.1A CN107544866B (en) 2016-06-29 2016-06-29 Log updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610499631.1A CN107544866B (en) 2016-06-29 2016-06-29 Log updating method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202011427464.2A Division CN112433889B (en) 2016-06-29 2016-06-29 Log generation method and device based on FTL table

Publications (2)

Publication Number Publication Date
CN107544866A true CN107544866A (en) 2018-01-05
CN107544866B CN107544866B (en) 2021-01-05

Family

ID=60966169

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201610499631.1A Active CN107544866B (en) 2016-06-29 2016-06-29 Log updating method and device
CN202011427464.2A Active CN112433889B (en) 2016-06-29 2016-06-29 Log generation method and device based on FTL table

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202011427464.2A Active CN112433889B (en) 2016-06-29 2016-06-29 Log generation method and device based on FTL table

Country Status (1)

Country Link
CN (2) CN107544866B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978885A (en) * 2022-08-02 2022-08-30 深圳市华曦达科技股份有限公司 Log management method and device, computer equipment and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241474A (en) * 2007-02-06 2008-08-13 三星电子株式会社 Memory mapping system and method
CN102760161A (en) * 2012-06-12 2012-10-31 天津神舟通用数据技术有限公司 Log organization structure clustered based on transaction aggregation and method for realizing corresponding recovery protocol thereof
CN103136116A (en) * 2011-12-05 2013-06-05 财团法人工业技术研究院 Memory storage system and central control device, management method and blackout recovery method thereof
CN105224478A (en) * 2015-09-25 2016-01-06 联想(北京)有限公司 A kind of formation of mapping table, renewal and restoration methods and electronic equipment
CN105630705A (en) * 2015-06-10 2016-06-01 上海磁宇信息科技有限公司 Data storage device and read-write method applying block replacement table

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080033649A (en) * 2006-10-12 2008-04-17 삼성전자주식회사 Flash memory system and managing method for the system capable of merging data less frequently
KR20130032155A (en) * 2011-09-22 2013-04-01 삼성전자주식회사 Data storage device and data management method thereof
US8880786B2 (en) * 2012-09-28 2014-11-04 Apple Inc. Flash translation layer (FTL) database journaling schemes
US9268682B2 (en) * 2012-10-05 2016-02-23 Skyera, Llc Methods, devices and systems for physical-to-logical mapping in solid state drives
US9170938B1 (en) * 2013-05-17 2015-10-27 Western Digital Technologies, Inc. Method and system for atomically writing scattered information in a solid state storage device
CA2881206A1 (en) * 2014-02-07 2015-08-07 Andrew WARFIELD Methods, systems and devices relating to data storage interfaces for managing address spaces in data storage devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241474A (en) * 2007-02-06 2008-08-13 三星电子株式会社 Memory mapping system and method
CN103136116A (en) * 2011-12-05 2013-06-05 财团法人工业技术研究院 Memory storage system and central control device, management method and blackout recovery method thereof
CN102760161A (en) * 2012-06-12 2012-10-31 天津神舟通用数据技术有限公司 Log organization structure clustered based on transaction aggregation and method for realizing corresponding recovery protocol thereof
CN105630705A (en) * 2015-06-10 2016-06-01 上海磁宇信息科技有限公司 Data storage device and read-write method applying block replacement table
CN105224478A (en) * 2015-09-25 2016-01-06 联想(北京)有限公司 A kind of formation of mapping table, renewal and restoration methods and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978885A (en) * 2022-08-02 2022-08-30 深圳市华曦达科技股份有限公司 Log management method and device, computer equipment and system

Also Published As

Publication number Publication date
CN112433889B (en) 2024-04-12
CN107544866B (en) 2021-01-05
CN112433889A (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN102779096B (en) Page, block and face-based three-dimensional flash memory address mapping method
CN102667736B (en) Memory management device and memory management method
CN101354681B (en) Memory system, abrasion equilibrium method and apparatus of non-volatile memory
CN102841851B (en) Flash memory management method and flash memory device
US8909986B2 (en) Data storing method for solid state drive to preserve data integrity after power failure
TWI399644B (en) Block management method for a non-volatile memory
CN107346290A (en) Zoned logic is reset to physical data address conversion table using parallelization log list
US10061710B2 (en) Storage device
CN107066393A (en) The method for improving map information density in address mapping table
CN108733510A (en) Data storage device and mapping table reconstruction method
CN107368429A (en) Data storage device, memory controller, data management method thereof and data block management method
CN104699413B (en) Data managing method, memory storage apparatus and memorizer control circuit unit
CN107003942A (en) To for strengthening the performance of storage device and the processing of persistent unmapped order
Margaglia et al. The Devil Is in the Details: Implementing Flash Page Reuse with {WOM} Codes
CN106371761A (en) Memory system and method of controlling nonvolatile memory
CN109164975A (en) A kind of method and solid state hard disk writing data into solid state hard disk
CN106557432B (en) Buffer storage supervisory method, memorizer control circuit unit and storage device
CN102576330A (en) Memory system having persistent garbage collection
CN101425041A (en) Optimizing method for establishing FAT file systems on NAND FLASH memory
CN104899154B (en) The page management method hosted is mixed based on embedded system
CN108228471A (en) Manage the method and system of the entity information of memory cell in memory device
JP2010097333A (en) Memory controller, flash memory system equipped with memory controller and method for controlling flash memory
CN109521944A (en) data storage device and data storage method
CN107544912A (en) A kind of log recording method, loading method and its device
CN109101437A (en) A kind of date storage method and terminal

Legal Events

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

Address after: 100192 room A302, building B-2, Dongsheng Science Park, Zhongguancun, 66 xixiaokou Road, Haidian District, Beijing

Patentee after: Beijing yihengchuangyuan Technology Co.,Ltd.

Address before: 100192 Room 302, 3 / F, building B-2, Dongsheng Science Park, 66 xixiaokou Road, Haidian District, Beijing

Patentee before: MEMBLAZE TECHNOLOGY (BEIJING) Co.,Ltd.