CN110058817A - A kind of solid state hard disk waste disposal method and its solid state hard disk - Google Patents

A kind of solid state hard disk waste disposal method and its solid state hard disk Download PDF

Info

Publication number
CN110058817A
CN110058817A CN201910289804.0A CN201910289804A CN110058817A CN 110058817 A CN110058817 A CN 110058817A CN 201910289804 A CN201910289804 A CN 201910289804A CN 110058817 A CN110058817 A CN 110058817A
Authority
CN
China
Prior art keywords
page
physical
physical page
information
physical block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910289804.0A
Other languages
Chinese (zh)
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.)
Shenzhen Dapu Microelectronics Co Ltd
Original Assignee
Shenzhen Dapu Microelectronics 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 Shenzhen Dapu Microelectronics Co Ltd filed Critical Shenzhen Dapu Microelectronics Co Ltd
Priority to CN201910289804.0A priority Critical patent/CN110058817A/en
Publication of CN110058817A publication Critical patent/CN110058817A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7205Cleaning, compaction, garbage collection, erase control

Abstract

The embodiment of the invention discloses a kind of solid state hard disk waste disposal method and its solid state hard disk, for reducing solid state hard disk design complexities and promote the efficiency of garbage disposal.The method comprise the steps that the write request that receiving host is initiated;According to the write request, data are written in the top n Physical Page of the first physical block into solid state hard disk, wherein the quantity of total Physical Page is N+1 in first physical block;Determine the corresponding logic page information of the top n Physical Page;Logic page information corresponding with the top n Physical Page is sequentially written in the last one Physical Page of first physical block.

Description

A kind of solid state hard disk waste disposal method and its solid state hard disk
Technical field
The present invention relates to computer field more particularly to a kind of solid state hard disk waste disposal method and its solid state hard disks.
Background technique
The people for being familiar with solid state hard disk (Solid State Disk, SSD) both knows about, and garbage disposal is in SSD firmware design An important ring, and influence SSD steady-state performance principal element, so the treatment effeciency of garbage disposal is SSD firmware needs The link of emphasis optimization.
The particle characteristics of flash memory (NAND) are as follows: data could be written after must wiping in physical block (Block), if wiping There are part valid data page (Physical Page for storing user data) for certain preceding physical block, in order not to lose user data, it is necessary to Data in valid data page are read out and are write in another physical block, then could wipe the physical block, here it is rubbish Processing, as shown in Figure 1, being the flow diagram of flash memory garbage disposal.
But the prior art has a disadvantage: during garbage disposal, firmware (Firmware, FW) needs additional maintenance To the mapping table (i.e. P2L table) of logic page information, which needs to write on flash memory one physics page information.Although this P2L The memory space that mapping table occupies is not very big, but increases the design complexities of firmware and reduce garbage reclamation The efficiency of process.
Summary of the invention
In view of this, being used for the embodiment of the invention provides a kind of solid state hard disk waste disposal method and its solid state hard disk It reduces the design complexities of solid state hard disk and promotes the efficiency of garbage disposal.
First aspect of the embodiment of the present invention provides a kind of solid state hard disk waste disposal method, may include:
The write request that receiving host is initiated;
According to the write request, data are written in the top n Physical Page of the first physical block into solid state hard disk, wherein institute The quantity for stating total Physical Page in the first physical block is N+1;
Determine the corresponding logic page information of the top n Physical Page;
Logic corresponding with the top n Physical Page is sequentially written in the last one Physical Page of first physical block Page information.
Optionally, in some embodiments of the invention, the method also includes:
It is successively read logic page information corresponding with the top n physics page information in the last one described Physical Page;It obtains Take logic page information Ly corresponding to currently-read physics page information Px;
Determine the corresponding physics page information Pz of logic page information Ly described in the L2P table pre-saved;
Judge whether Px and Pz is identical;
If Px=Pz, currently the corresponding Physical Page of read physics page information Px is effective Physical Page for this;
If Px!=Pz, then the corresponding Physical Page of the current read physics page information Px is invalid physical page;
Wherein, x, y, z are the integer more than or equal to 0.
Optionally, in some embodiments of the invention, the method also includes:
The corresponding data of Physical Page effective in first physical block are written in the second physical block;
Determine the corresponding logic page information of effective Physical Page in first physical block;
Patrolling for effective Physical Page in first physical block is written in the last one Physical Page of second physical block Collect page information.
Optionally, in some embodiments of the invention, the method also includes:
Wipe the data in the Physical Page of first physical block.
Optionally, in some embodiments of the invention, the method also includes:
The last one Physical Page of logic page information corresponding with the top n Physical Page will be written, is read from flash memory Into random access memory.
Second aspect of the present invention provides a kind of solid state hard disk, may include:
Transceiver, the write request initiated for receiving host;
Processor, for number to be written in the top n Physical Page of the first physical block into solid state hard disk according to the write request According to, wherein the quantity of total Physical Page is N+1 in first physical block;Determine the corresponding logical page (LPAGE) letter of the top n Physical Page Breath;Logical page (LPAGE) letter corresponding with the top n Physical Page is sequentially written in the last one Physical Page of first physical block Breath.
Optionally, in some embodiments of the invention,
The processor, is also used to be successively read in the last one described Physical Page that top n physics page information is corresponding to patrol Collect page information;Obtain logic page information Ly corresponding to currently-read physics page information Px;Determine the L2P table pre-saved Described in the corresponding physics page information Pz of logic page information Ly;Judge whether Px and Pz is identical;If Px=Pz, this is current to be read The corresponding Physical Page of physics page information Px taken is effective Physical Page;If Px!=Pz, the then current read physics page information The corresponding Physical Page of Px is invalid physical page;Wherein, x, y, z are the integer more than or equal to 0.
Optionally, in some embodiments of the invention,
The processor is also used to the corresponding data of Physical Page effective in first physical block being written to the second physics In block;Determine the corresponding logic page information of effective Physical Page in first physical block;In last of second physical block The logic page information of effective Physical Page in first physical block is written in a Physical Page.
Optionally, in some embodiments of the invention,
The processor is also used to wipe the data in the Physical Page of first physical block.
Optionally, in some embodiments of the invention,
The processor is also used to be written the last one object of logic page information corresponding with the top n Physical Page Page is managed, is read in random access memory from flash memory.
The third aspect of the embodiment of the present invention provides a kind of computer readable storage medium, including instruction, when it is being calculated When being run on machine, so that computer executes the method as described in above-mentioned first aspect or first aspect any optional way.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
In embodiments of the present invention, the write request that receiving host is initiated;According to the write request, into solid state hard disk first Data are written in the top n Physical Page of physical block, wherein the quantity of total Physical Page is N+1 in first physical block;Determine institute State the corresponding logic page information of top n Physical Page;It is sequentially written in the last one Physical Page of first physical block and institute State the corresponding logic page information of top n Physical Page.It is sequentially written in the last one Physical Page of first physical block and preceding N The corresponding logic page information of a Physical Page, does not need solid state hard disk and in addition safeguards that P2L table writes the physical location information on flash memory, To reduce the complexity of solid state hard disk design, promote the efficiency of solid state hard disk garbage disposal.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to institute in embodiment and description of the prior art Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is the flow diagram of flash memory garbage disposal in the prior art;
Fig. 2 is the schematic diagram of L2P table and P2L table in the prior art;
Fig. 3 is the relation schematic diagram of physical block and P2L table in the embodiment of the present invention;
Fig. 4 is one embodiment schematic diagram of solid state hard disk waste disposal method in the embodiment of the present invention;
Fig. 5 is another embodiment schematic diagram of solid state hard disk waste disposal method in the embodiment of the present invention;
Fig. 6 is one embodiment schematic diagram of solid state hard disk in the embodiment of the present invention;
Fig. 7 is another embodiment schematic diagram of solid state hard disk in the embodiment of the present invention.
Specific embodiment
It is hard for reducing solid-state the embodiment of the invention provides a kind of solid state hard disk waste disposal method and its solid state hard disk The design complexities of disk and the efficiency for promoting garbage disposal.
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical solution in the embodiment of the present invention are described, it is clear that described embodiment is only present invention a part Embodiment, instead of all the embodiments.Based on the embodiments of the present invention, it should fall within the scope of the present invention.
Conventionally, as the particle characteristics of flash memory (NAND) are as follows: physical block (Block) can just be write after must wiping Enter data, if certain physical block is there are part valid data page (Physical Page for storing user data) before erasing, in order not to Lose user data, it is necessary to the data in valid data page be read out and write in another physical block, this then could be wiped Physical block, here it is garbage disposals.The garbage disposal process can be divided into three steps:
1. selecting source physical block (the generally least physical block of valid data page);
2. finding valid data page from the physical block of source;
3. valid data page to be written to new physical block.
Fig. 1 is the flow diagram of flash memory garbage disposal in the prior art;In as shown in Figure 1, physical block (Block) 0,1, There is part valid data page (Valid Physical Page i.e. shown in figure) in 2, is write then valid data page must be read out Into new physical block N, invalid data Physical Page (the invalid object i.e. shown in figure in physical block 0,1,2 is then wiped again Manage page), make physical block 0,1,2, become writeable physical block (Physical Page for being included is writeable blank page None), complete rubbish Rubbish process flow.
Firmware in solid state hard disk needs service logic page (LPA, it is assumed that size 16KB) to Physical Page (PPA, it is assumed that big The small map information for 16KB).Wherein, logical page (LPAGE) is properly termed as mapping table (L2P table) to the complete map information of Physical Page, The L2P table is using logic page information as index value;It is corresponding to patrol after the Data Migration in valid data page in garbage disposal process The mapping table (i.e. L2P table) for collecting page information to physics page information is also required to synchronized update.In addition, in solid state hard disk, Mei Geyong User data physical block is owned by a physics page information to the mapping table (i.e. P2L table) of logic page information, and the P2L table is in number of users When carrying out data write-in according to physical block, established simultaneously in random access memory (Random Access Memory, RAM) It updates, P2L table has recorded in the user data physical block that each physics page information is corresponding to patrol using physics page information as index value Collect page information.
Fig. 2 is the schematic diagram of L2P table and P2L table in the prior art;To illustrate shown in Fig. 2, logical page (LPAGE) 0 is written for the first time When, it writes in Physical Page 0 so information is that L0 is mapped to P0 (i.e. L0- > P0 described in computational language) in L2P table, in P2L table Information is that P0 maps to L0 (i.e. P0- > L0 described in computational language), and soon host makes carbon copies logical page (LPAGE) 0 again later, at this time The data of the logical page (LPAGE) 0 are write Physical Page 2 by SSD, then L2P table information is that L0 maps to P0 (i.e. described by calculating i.e. language L0- > P2), P2L table information be P2- > L0 (information of P0- > L0 still remains), it is then clear that at this time in Physical Page 0 Data are invalid, and the data in Physical Page 2 are only effectively, after user data physical block 0 writes, corresponding P2L table Also it has updated and has finished, be then written to the P2L table in the Physical Page 0 of P2L table physical block 0, firmware needs to remember user data object The mapping relations of Physical Page 0 in block 0 and P2L table physical block 0 are managed, so as to subsequent reading, i.e. firmware needs additional maintenance P2L table to write Physical location information on to NAND.
Shown in Fig. 2, in the prior art, the maintenance process of L2P table and L2P table is as follows (assuming that a physical block includes 8 A Physical Page):
Step1: when physical block has data write-in for the first time, SSD firmware distributes one piece of 32B in RAM (or DRAM) Caching (buffer) be used as P2L table.
Step2: with the write-in of Physical Page in physical block, also synchronized update, update rule are such as above for the information in P2L table It is described.
Step3: it after the physical block all writes, is written in flash memory using the P2L table as system data, SSD firmware It can remember the location information of write-in.
Step4:SSD internal trigger garbage disposal process, and using the physical block as source physical block.
The corresponding P2L table of the physical block that Step5:SSD firmware is safeguarded before writes the physical bit confidence on NAND Breath, reads P2L table in RAM from flash memory.
Step6: information in P2L table is successively read (from P0 to P7), it is assumed that the corresponding logical page (LPAGE) of Px is Ly, then searching The corresponding physics page information Pz of L2P table Ly illustrates that the Physical Page is effective Physical Page, otherwise (Px if Px=Pz!=Pz, i.e., Px is not equal to Pz), illustrate that the Physical Page is invalid physical page;All effective Physical Page in the physical block are determined with this method.
Step6: the data in effective Physical Page are read out, and are written to new Physical Page, and synchronized update L2P table and new The corresponding P2L table information of Physical Page.
Step7: all Physical Page of the physical block all in vain, can be wiped directly.
Based on art methods, the embodiment of the present invention proposes a kind of new technical solution, and firmware can not have to additional dimension Shield P2L table writes the physical location information on flash memory (NAND);It reduces the design complexities of firmware and promotes garbage reclamation mistake The efficiency of journey further decreases the design complexities of solid state hard disk and promotes the efficiency of garbage disposal.
The core concept of technical solution of the present invention are as follows: include: 0 to N total N+1 Physical Page in a physical block, use physics The last one Physical Page N stores first N pages in the physical block (the logic page information of Physical Page 0 to Physical Page N-1) (is also referred to as patrolled in block Collect address).
As shown in figure 3, for the relation schematic diagram of physical block and P2L table in the embodiment of the present invention.As shown in Figure 3, physics When block 0 receives write request, data are written in Physical Page P0- Physical Page P6, determine the corresponding logic letter of Physical Page P0-P6 The corresponding logical message of Physical Page P0-P6 is written in breath in the last one Physical Page P7.Further, when physical block 0 carries out rubbish When rubbish processing, determine that P2, P3, P5, P6 are effective Physical Page, so, P2, P3, P5, P6 are written in another physical block, Then, data erasing is carried out to physical block 0.
Below by way of examples, technical solution of the present invention is described further, as shown in figure 4, for the present invention One embodiment schematic diagram of solid state hard disk waste disposal method in embodiment may include:
401, the write request that receiving host is initiated.
The write request that solid state hard disk receiving host is initiated, the quantity of the write request are not specifically limited;Wherein, in write request Including logic page information and physics page information.
402, according to write request, data are written in the top n Physical Page of the first physical block into solid state hard disk, wherein the The quantity of total Physical Page is N+1 in one physical block.
Solid state hard disk according to the write request, into solid state hard disk the first physical block top n Physical Page (Physical Page 0 to Physical Page N-1) in be written data, wherein in the first physical block the quantity of total Physical Page be N+1 (Physical Page 0 to Physical Page N), N For the integer greater than 0.
Assuming that there is 8 Physical Page in the first physical block of the solid state hard disk.That is N+1=8 in the first physical block, host are initiated Write request with write the relationship of Physical Page are as follows:
For the first time: writing L0 to P0, update L0- > P0 in L2P table;
Second: writing L1 to P1, update L1- > P1 in L2P table;
For the third time: writing L0 to P2, update L0- > P2 in L2P table, data are invalid in P0;
4th time: writing L1 to P3, update L1- > P3 in L2P table, data are invalid in P1;
5th time: writing L2 to P4, update L2- > P4 in L2P table;
6th time: writing L2 to P5, update L2- > P5 in L2P table, data are invalid in P4;
7th time: writing L3 to P6, update L3- > P6 in L2P table.
403, the corresponding logic page information of top n Physical Page is determined.
Solid state hard disk determines the corresponding logic page information of the top n Physical Page, wherein it can be understood that logical page (LPAGE) is believed Breath is generally referred to as logical page address.
Illustratively, the corresponding logical message of first Physical Page P0 is L0, the corresponding logic letter of second Physical Page P1 Breath is L1, and the corresponding logical message of third Physical Page P2 is L0, and the 4th corresponding logical message of Physical Page P3 is L1, the 5th The corresponding logical message of a Physical Page P4 is L2, and the 6th corresponding logical message of Physical Page P5 is L2, the 7th Physical Page P6 Corresponding logical message is L3.
404, the corresponding logical page (LPAGE) letter of top n Physical Page is sequentially written in the last one Physical Page of the first physical block Breath.
Logic page information corresponding with top n Physical Page is sequentially written in the last one Physical Page of the first physical block, It may include: to be sequentially written in logical message corresponding with top n Physical Page in the last one Physical Page of the first physical block.
Illustratively, solid state hard disk is sequentially written in and preceding 7 objects in the last one Physical Page (P7) of the first physical block The corresponding logical message of page P0-P6 is managed, L0, L1, L0, L1, L2, L2, L3 are respectively as follows:.
In embodiments of the present invention, the write request that receiving host is initiated;According to write request, the first physics into solid state hard disk Data are written in the top n Physical Page of block, wherein the quantity N+1 of total Physical Page in the first physical block;Determine top n Physical Page Corresponding logic page information;Patrol corresponding with top n Physical Page is sequentially written in the last one Physical Page of the first physical block Collect page information.Logical page (LPAGE) corresponding with top n Physical Page is sequentially written in the last one Physical Page of first physical block Information does not need solid state hard disk and in addition safeguards that P2L table writes the physical location information on flash memory, thus, it reduces solid state hard disk and sets The complexity of meter promotes the efficiency of solid state hard disk garbage disposal.
As shown in figure 5, for another embodiment schematic diagram of solid state hard disk waste disposal method in the embodiment of the present invention, it can To include:
It should be noted that embodiment shown in fig. 5 executes on the basis of the embodiment shown in fig. 4.
501, it is successively read the corresponding logic page information of top n physics page information in the last one Physical Page;It obtains current Logic page information Ly corresponding to read physics page information Px.
Solid state hard disk can store target physical page in a flash memory, when starting garbage disposal process, and the first physical block When as source physical block, the last one Physical Page in the first physical block can be read in random access memory from flash memory.
It is understood that SSD firmware reads Physical Page P7 in RAM from flash memory.Solid state hard disk is successively read and preceding N The corresponding logic page information of a physics page information.Physics page information and logic page information have one-to-one mapping relations;Show Example property, the description in the step 402 in embodiment according to Fig.4,;When physics page information is P0, then there are corresponding by P0 Logic page information is L0;When physics page information is P1, then P1 is L1 there are corresponding logic page information;When physics page information is When P2, then P2 is L0 there are corresponding logic page information;When physics page information is P3, then there are corresponding logic page informations by P3 For L1;When physics page information is P4, then P4 is L2 there are corresponding logic page information;When physics page information is P5, then P5 It is L2 there are corresponding logic page information;When physics page information is P6, then P6 is L3 there are corresponding logic page information.
It is understood that physics page information can also abbreviation physical message, logic page information can also abbreviation logic letter Breath.
502, the corresponding physics page information Pz of logic page information Ly in the L2P table pre-saved is determined.
Solid state hard disk determines the corresponding physics page information Pz of logic page information Ly in the L2P table pre-saved.
503, judge whether Px and Pz is identical.
If 504, Px=Pz, currently the corresponding Physical Page of read physics page information Px is effective Physical Page for this.
If 505, Px!=Pz, then the corresponding Physical Page of the current read physics page information Px is invalid physical page.
Wherein,!=it is computer language, it indicates to be not equal to;X, y, z are the integer more than or equal to 0.
Illustratively, solid state hard disk is successively read each physics page information Px in Physical Page 7 (P7), it is assumed that Px is corresponding to patrol Collecting page is Ly, then searching the corresponding physics page information Pz of L2P table Ly, if Px=Pz, illustrates that the Physical Page is effective physics Page, otherwise (Px!=Pz), illustrate that the Physical Page is invalid physical page.Physical Page 2,3,5,6 is in the first physical block of the present embodiment Effective Physical Page, Physical Page 0, Isosorbide-5-Nitrae are invalid physical page.
506, the corresponding data of effective Physical Page in the first physical block are written in the second physical block.
Corresponding data in Physical Page effective in the first physical block are read out in solid state hard disk, are written to new physical block (can be described as the second physical block), and synchronized update L2P table and the physics that logic page information is write to last page in new physical block Page.
507, the corresponding logic page information of effective Physical Page in the first physical block is determined.
Step 507 can refer to the explanation of step 403, and details are not described herein again.
508, the logical page (LPAGE) of effective Physical Page in the first physical block is written in the last one Physical Page of the second physical block Information.
Step 508 can refer to the explanation of step 404, and details are not described herein again.
509, the data in the Physical Page of the first physical block are wiped.
Solid state hard disk wipes the data in the Physical Page of the first physical block, that is, determines all Physical Page of first physical block All in vain, it directly wipes.In embodiments of the present invention, the logic write request that receiving host is initiated;According to logic write request, to Data are written in the top n Physical Page of the first physical block in solid state hard disk, wherein the quantity of total Physical Page is in the first physical block N+1;Determine the logical message of top n Physical Page;Top n Physical Page is written in the last one Physical Page of the first physical block Logical message.The logical message that top n Physical Page is written i.e. in the last one Physical Page of first physical block does not need another Outer maintenance P2L table writes the physical location information on flash memory, thus, the complexity of solid state hard disk design is reduced, it is hard to promote solid-state The efficiency of disk garbage disposal.
To sum up, by the analysis of Fig. 4 and embodiment illustrated in fig. 5 as it can be seen that the corresponding P2L table of user data physical block has write on In the physical block, so basic It is not necessary to go to safeguard another mapping table again.I.e. solid state hard disk is each physical block volume One Physical Page of outer maintenance during garbage disposal, passes through the data pair of P2L table and L2P table to the mapping table (P2L table) of logical page (LPAGE) Than that can find out valid data page in physical block rapidly, firmware design complexity is effectively reduced and improve the effect of garbage disposal Rate.
As shown in fig. 6, may include: for one embodiment schematic diagram of solid state hard disk in the embodiment of the present invention
Transceiver module 601, the write request initiated for receiving host;
Processing module 602, for being written in the top n Physical Page of the first physical block into solid state hard disk according to write request Data, wherein the quantity of total Physical Page is N+1 in the first physical block;Determine the corresponding logic page information of top n Physical Page;? Logic page information corresponding with top n Physical Page is sequentially written in the last one Physical Page of first physical block.
Optionally, in some embodiments of the invention,
Processing module 602 is also used to be successively read the corresponding logical page (LPAGE) of top n physics page information in the last one Physical Page Information;Obtain logic page information Ly corresponding to currently-read physics page information Px;It determines and is patrolled in the L2P table pre-saved Collect the corresponding physics page information Pz of page information Ly;Judge whether Px and Pz is identical;If Px=Pz, the current read physics The corresponding Physical Page of page information Px is effective Physical Page;If Px!=Pz, then the current read physics page information Px is corresponding Physical Page is invalid physical page;Wherein, x, y, z are the integer more than or equal to 0.
Optionally, in some embodiments of the invention,
Processing module 602 is also used to the corresponding data of effective Physical Page in the first physical block being written to the second physical block In;Determine the corresponding logic page information of effective Physical Page in the first physical block;In the last one Physical Page of the second physical block The logic page information of effective Physical Page in the first physical block is written.
Optionally, in some embodiments of the invention,
Processing module 602 is also used to wipe the data in the Physical Page of the first physical block.
Optionally, in some embodiments of the invention,
Processing module 602 is also used to be written the last one physics of logic page information corresponding with top n Physical Page Page, reads in random access memory from flash memory.
As shown in fig. 7, may include: for another embodiment schematic diagram of solid state hard disk in the embodiment of the present invention
Transceiver 701, the write request initiated for receiving host;
Processor 702, for number to be written in the top n Physical Page of the first physical block into solid state hard disk according to write request According to wherein the quantity of total Physical Page is N+1 in the first physical block;Determine the corresponding logic page information of top n Physical Page;First Logic page information corresponding with the top n Physical Page is sequentially written in the last one Physical Page of physical block.
Optionally, in some embodiments of the invention,
Processor 702 is also used to be successively read logic page information corresponding with top n physics page information;Obtain current institute Logic page information Ly corresponding to the physics page information Px of reading;Determine that logic page information Ly is corresponding in the L2P table pre-saved Physics page information Pz;Judge whether Px and Pz is identical;If Px=Pz, the current read physics page information Px is corresponding Physical Page is effective Physical Page;If Px!=Pz, then the corresponding Physical Page of the current read physics page information Px is invalid object Manage page;Wherein, x, y, z are the integer more than or equal to 0.
Optionally, in some embodiments of the invention,
Processor 702 is also used to for the corresponding data of effective Physical Page in the first physical block being written in the second physical block; Determine the corresponding logic page information of effective Physical Page in the first physical block;It is written in the last one Physical Page of the second physical block The logic page information of effective Physical Page in first physical block.
Optionally, in some embodiments of the invention,
Processor 702 is also used to wipe the data in the Physical Page of the first physical block.
Optionally, in some embodiments of the invention,
Processor 702 is also used to be written the last one Physical Page of logic page information corresponding with top n Physical Page, It is read in random access memory from flash memory.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
Computer program product includes one or more computer instructions.Load and execute on computers computer program When instruction, the process or function according to the embodiment of the present application are entirely or partly generated.Computer can be general purpose computer, specially With computer, computer network or other programmable devices.Computer instruction can store in computer readable storage medium In, or transmit from a computer readable storage medium to another computer readable storage medium, for example, computer instruction can To pass through wired (such as coaxial cable, optical fiber, Digital Subscriber Line from a web-site, computer, server or data center (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode is into another web-site, computer, server or data The heart is transmitted.Computer readable storage medium can be any usable medium or include one that computer can store Or the data storage devices such as integrated server, data center of multiple usable mediums.Usable medium can be magnetic medium, (example Such as, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
It, can if integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product To be stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention substantially or Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products Out, which is stored in a storage medium, including some instructions are used so that a computer equipment (can be personal computer, server or the network equipment etc.) executes all or part of each embodiment method of the present invention Step.And storage medium above-mentioned include: USB flash disk, it is mobile hard disk, read-only memory (ROM, Read-Only Memory), random Access various Jie that can store program code such as memory (RAM, Random Access Memory), magnetic or disk Matter.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of solid state hard disk waste disposal method characterized by comprising
The write request that receiving host is initiated;
According to the write request, data are written in the top n Physical Page of the first physical block into solid state hard disk, wherein described The quantity of total Physical Page is N+1 in one physical block;
Determine the corresponding logic page information of the top n Physical Page;
Logical page (LPAGE) letter corresponding with the top n Physical Page is sequentially written in the last one Physical Page of first physical block Breath.
2. the method according to claim 1, wherein the method also includes:
It is successively read logic page information corresponding with the top n physics page information in the last one described Physical Page;Acquisition is worked as Logic page information Ly corresponding to preceding read physics page information Px;
Determine the corresponding physics page information Pz of logic page information Ly described in the L2P table pre-saved;
Judge whether Px and Pz is identical;
If Px=Pz, currently the corresponding Physical Page of read physics page information Px is effective Physical Page for this;
If Px!=Pz, then the corresponding Physical Page of the current read physics page information Px is invalid physical page;
Wherein, x, y, z are the integer more than or equal to 0.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
The corresponding data of Physical Page effective in first physical block are written in the second physical block;
Determine the corresponding logic page information of effective Physical Page in first physical block;
The logical page (LPAGE) of effective Physical Page in first physical block is written in the last one Physical Page of second physical block Information.
4. method according to claim 3, which is characterized in that the method also includes:
Wipe the data in the Physical Page of first physical block.
5. according to right want any one of 1-3 described in method, which is characterized in that the method also includes:
Will corresponding with the top n Physical Page logic page information of write-in the last one Physical Page, read from flash memory with In machine memory.
6. a kind of solid state hard disk characterized by comprising
Transceiver, the write request initiated for receiving host;
Processor, for data to be written in the top n Physical Page of the first physical block into solid state hard disk according to the write request, Wherein, the quantity of total Physical Page is N+1 in first physical block;Determine the corresponding logic page information of the top n Physical Page; Logic page information corresponding with the top n Physical Page is sequentially written in the last one Physical Page of first physical block.
7. solid state hard disk according to claim 6, which is characterized in that
The processor is also used to be successively read the corresponding logical page (LPAGE) of top n physics page information in the last one described Physical Page Information;
Obtain logic page information Ly corresponding to currently-read physics page information Px;Determine institute in the L2P table pre-saved State the corresponding physics page information Pz of logic page information Ly;
Judge whether Px and Pz is identical;If Px=Pz, currently the corresponding Physical Page of read physics page information Px is to have for this Imitate Physical Page;If Px!=Pz, then the corresponding Physical Page of the current read physics page information Px is invalid physical page;Wherein, X, y, z are the integer more than or equal to 0.
8. solid state hard disk according to claim 7, which is characterized in that
The processor is also used to the corresponding data of Physical Page effective in first physical block being written to the second physical block In;Determine the corresponding logic page information of effective Physical Page in first physical block;In the last one of second physical block The logic page information of effective Physical Page in first physical block is written in Physical Page.
9. solid state hard disk according to claim 8, which is characterized in that
The processor is also used to wipe the data in the Physical Page of first physical block.
10. solid state hard disk a method according to any one of claims 6-8, which is characterized in that
The processor is also used to be written the last one Physical Page of logic page information corresponding with the top n Physical Page, It is read in random access memory from flash memory.
CN201910289804.0A 2019-04-11 2019-04-11 A kind of solid state hard disk waste disposal method and its solid state hard disk Pending CN110058817A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910289804.0A CN110058817A (en) 2019-04-11 2019-04-11 A kind of solid state hard disk waste disposal method and its solid state hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910289804.0A CN110058817A (en) 2019-04-11 2019-04-11 A kind of solid state hard disk waste disposal method and its solid state hard disk

Publications (1)

Publication Number Publication Date
CN110058817A true CN110058817A (en) 2019-07-26

Family

ID=67317685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910289804.0A Pending CN110058817A (en) 2019-04-11 2019-04-11 A kind of solid state hard disk waste disposal method and its solid state hard disk

Country Status (1)

Country Link
CN (1) CN110058817A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101676882A (en) * 2008-09-16 2010-03-24 美光科技公司 Built-in mapping message of memory device
US20100180145A1 (en) * 2009-01-15 2010-07-15 Phison Electronics Corp. Data accessing method for flash memory, and storage system and controller system thereof
CN103744795A (en) * 2013-12-19 2014-04-23 记忆科技(深圳)有限公司 Method for rapidly booting solid state disc and solid state disc thereof
CN109542800A (en) * 2018-11-23 2019-03-29 深圳大普微电子科技有限公司 Method, solid state hard disk and the storage device of garbage disposal based on flash memory

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101676882A (en) * 2008-09-16 2010-03-24 美光科技公司 Built-in mapping message of memory device
US20100180145A1 (en) * 2009-01-15 2010-07-15 Phison Electronics Corp. Data accessing method for flash memory, and storage system and controller system thereof
CN103744795A (en) * 2013-12-19 2014-04-23 记忆科技(深圳)有限公司 Method for rapidly booting solid state disc and solid state disc thereof
CN109542800A (en) * 2018-11-23 2019-03-29 深圳大普微电子科技有限公司 Method, solid state hard disk and the storage device of garbage disposal based on flash memory

Similar Documents

Publication Publication Date Title
CN109254733B (en) Method, device and system for storing data
CN107391653B (en) Distributed NewSQL database system and picture data storage method
CN108519862A (en) Storage method, device, system and the storage medium of block catenary system
CN101826107B (en) Hash data processing method and device
CN110018989B (en) Snapshot comparison method and device
CN104503703B (en) The treating method and apparatus of caching
CN105760113A (en) High-speed storage equipment based on NAND flash memory and file management method
CN104461390A (en) Method and device for writing data into imbricate magnetic recording SMR hard disk
CN102841854A (en) Method and system for executing data reading based on dynamic hierarchical memory cache (hmc) awareness
CN103677674B (en) A kind of data processing method and device
CN109918352B (en) Memory system and method of storing data
US10884926B2 (en) Method and system for distributed storage using client-side global persistent cache
CN107329704B (en) Cache mirroring method and controller
US20130198198A1 (en) Generating method, generating system, and recording medium
CN111292225B (en) Partitioning graphics data for large-scale graphics processing
US20170160940A1 (en) Data processing method and apparatus of solid state disk
CN104092670A (en) Method for utilizing network cache server to process files and device for processing cache files
CN104881366A (en) Heal Leveling Method And System
CN111831691B (en) Data reading and writing method and device, electronic equipment and storage medium
CN104166627B (en) A kind of SCM Based NAND FLASH write operation methods
CN109189724B (en) Method and device for improving audio and video data storage efficiency of video monitoring system
CN104572492A (en) Method and apparatus of burning data to FAT (File Allocation Table)32 partition
CN104391947B (en) Magnanimity GIS data real-time processing method and system
CN112596949A (en) High-efficiency SSD (solid State disk) deleted data recovery method and system
CN110780814B (en) Stored data sorting method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190726

RJ01 Rejection of invention patent application after publication