CN101441552B - Flash memory medium bad block processing method - Google Patents
Flash memory medium bad block processing method Download PDFInfo
- Publication number
- CN101441552B CN101441552B CN2007101878390A CN200710187839A CN101441552B CN 101441552 B CN101441552 B CN 101441552B CN 2007101878390 A CN2007101878390 A CN 2007101878390A CN 200710187839 A CN200710187839 A CN 200710187839A CN 101441552 B CN101441552 B CN 101441552B
- Authority
- CN
- China
- Prior art keywords
- data
- memory medium
- flash memory
- piece
- flash media
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention provides a method for processing a bad block of a flash memory medium, wherein the flash memory medium is electrically connected with a host computer through a USB-SCSI interface which supports the Mass Storge protocol. The method comprises: reporting the data error type of an SCSI layer to the host computer; selecting a novel block; copying all the data on the bad block to the novel block; and updating the corresponding relation between a logical block and the novel block of the flash memory medium, and forming a novel logical comparison table. The method for processing the bad block of the flash memory medium does not occupy Ram resources of the host computer, and can improve the operating speed of the flash memory medium.
Description
Technical field
The present invention relates to the semiconductor memory field, particularly a kind of flash memory medium bad block processing method.
Background technology
Flash media has more and more received popular favor as mobile memory medium; And flash media has serviceable life; Generally speaking; Piece (Block) in the flash media has 10000 times erasing and writing life, in case arrive 10000 times the piece that perhaps runs into the poor quality serviceable life, problems such as instability perhaps reports an error will occur.The storage space of prior art flash media is divided into a plurality of, and several pages or leaves are arranged in the piece, is that unit writes with the page or leaf, is that unit is wiped with the piece.
Flash media is being write fashionable can not the interruption, and after finding to write the page or leaf of makeing mistakes, the data that should write on the page or leaf of makeing mistakes are saved among the Ram of computing machine, and corresponding sign is set.After writing end, flash media finds a new piece, and all data that correctly write together write in the new piece together with the data that should write among the Ram that is kept at computing machine on the page or leaf of makeing mistakes on the piece at the page or leaf place that will make mistakes.If a lot of pages or leaves are made mistakes, just need a lot of Ram to come the interim data of preserving, may consume a lot of Ram resources, increase hardware spending.This shows that prior art not only will take the Ram of computing machine, but also can have a strong impact on the writing speed of flash media on the problem that processing flash media piece is made mistakes.
Summary of the invention
The object of the invention is to provide a kind of flash memory medium bad block processing method, can not take under the Ram resources supplIes of hardware, improves the efficient of the restore data of flash media.
The present invention provides a kind of flash memory medium bad block processing method; Flash media is electrically connected with main frame through the USB-SCSI interface of supporting Mass Storge agreement; Comprise step: according to the MassStorge agreement of USB-SCSI interface, to the main frame report SCSI layer data type of makeing mistakes; Select new piece; Duplicate the extremely new piece of all data on the bad piece; Upgrade the logical block of said flash media and the corresponding relation of new piece, form new logical comparison table.
The above-mentioned report SCSI layer data type of makeing mistakes is the type of makeing mistakes that is not ready for to the main frame transmitting apparatus.
Above-mentioned all data comprise and write data that bad piece makes mistakes and write the data that bad piece is not made mistakes.
Flash memory medium bad block processing method provided by the invention does not take the Ram resource of main frame, more renews piece fast, improves the travelling speed of flash media.
Description of drawings
Fig. 1 is the schematic flow sheet of first embodiment of the invention;
Fig. 2 is the schematic flow sheet of second embodiment of the invention;
Fig. 3 is the schematic flow sheet of third embodiment of the invention.
The realization of the object of the invention, functional characteristics and advantage will combine embodiment, further specify with reference to accompanying drawing.
Embodiment
With reference to Fig. 1, the schematic flow sheet of first embodiment of the invention is shown.Flash media of the present invention adopts logical block and physical block that it is managed, and can find physical block (physical block is hereinafter to be referred as piece) to carry out read-write operation through logical block.
Flash media is electrically connected with main frame through USB-SCSI interface (USB small computer system interface), and USB-SCSI interface of the present invention is supported Mass Storge agreement (storage protocol in batches).The flash media write data that powers on; When flash media is found the page or leaf write error; Execution in step S100 sends report to main frame, and report SCSI layer data is made mistakes; Type of error is " equipment is not ready for (DEVICE NOT READY) ", and promptly the piece at the page or leaf place of makeing mistakes in the flash media is not ready for.
Execution in step S200 after the report of flash media transmission " equipment is not ready for " selects new piece, in flash media, selects a new piece of not makeing mistakes.
Execution in step S300, according to the Mass Storge agreement of USB-SCSI interface, when main frame received " equipment is not ready for " that flash media sends wrong, main frame resend the data that write this piece.These data comprise and write data that bad piece makes mistakes and write the data that bad piece is not made mistakes.Flash media writes the data that receive in the new piece and preserves.
Next carry out step S400; After new piece writes data; More new logical block and the newly corresponding relation of piece; The physical address of new piece is corresponding with the logical address of logical block, form logical comparison table, make main frame when carrying out reading of data, can find the physical address of new piece and then find the data of preserving in the new piece.
Show second embodiment of the invention with reference to Fig. 2, before flash media is write data, earlier flash media is carried out erase operation.Because flash media bad piece can occur when dispatching from the factory or after using the regular period,, erasure error can appear when then carrying out erase operation.Flash media was done the piece of makeing mistakes and was given up processing this moment.Comprise specifically: execution in step S1000, select a new piece; Execution in step S2000, the corresponding relation of new logical block and new piece more is associated the physical address of new piece with the logical address of logical block, form new logical comparison table, makes main frame ability ditch can find the location, physics location of new piece through the logical address of logical block.
Show third embodiment of the invention with reference to Fig. 3, reading appears in flash media makes mistakes, because mistake appears in piece, data can't be repaired, and this moment, flash media execution in step S10000 selected a new piece; Execution in step S20000 duplicates the extremely new piece of data on the piece of makeing mistakes, and gives up the piece of makeing mistakes, and replaces the piece of makeing mistakes with new piece; Execution in step S30000; The corresponding relation of new logical block and new piece more is associated the physical address of new piece with the logical address of logical block, form new logical comparison table; Make main frame can find the physical address of new piece, and then read the data of preserving on the new piece through the logical address of logical block.
The above is merely the preferred embodiments of the present invention; Be not so limit claim of the present invention; Every equivalent structure or equivalent flow process conversion that utilizes instructions of the present invention and accompanying drawing content to be done; Or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.
Claims (3)
1. flash memory medium bad block processing method, flash media is electrically connected with main frame through the USB-SCSI interface of supporting Mass Storge agreement, comprising:
When flash media is found the page or leaf write error, according to the Mass Storge agreement of USB-SCSI interface to the main frame report SCSI layer data type of makeing mistakes;
The new piece that selection does not make mistakes from said flash media;
Main frame resends all data that write to said new, and said data comprise, all data on the bad piece of write error take place in the said flash media; And
Upgrade the logical block and the said new corresponding relation of said flash media, form new logical comparison table.
2. flash memory medium bad block processing method according to claim 1 is characterized in that, the said report SCSI layer data type of makeing mistakes is the type of makeing mistakes that is not ready for to the main frame transmitting apparatus.
3. flash memory medium bad block processing method according to claim 1 is characterized in that, said all data comprise and write data that bad piece makes mistakes and write the data that bad piece is not made mistakes.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007101878390A CN101441552B (en) | 2007-11-19 | 2007-11-19 | Flash memory medium bad block processing method |
HK09111049.9A HK1133309A1 (en) | 2007-11-19 | 2009-11-26 | Method for managing a bad block of a flash memory medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007101878390A CN101441552B (en) | 2007-11-19 | 2007-11-19 | Flash memory medium bad block processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101441552A CN101441552A (en) | 2009-05-27 |
CN101441552B true CN101441552B (en) | 2012-05-23 |
Family
ID=40726003
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2007101878390A Active CN101441552B (en) | 2007-11-19 | 2007-11-19 | Flash memory medium bad block processing method |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101441552B (en) |
HK (1) | HK1133309A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112162936B (en) * | 2020-09-30 | 2023-06-30 | 武汉天喻信息产业股份有限公司 | Method and system for dynamically enhancing FLASH erasing times |
CN112612418B (en) * | 2020-12-25 | 2024-03-08 | 航天信息股份有限公司 | Method and system for managing large-capacity NandFlash bad blocks |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1728282A (en) * | 2004-07-30 | 2006-02-01 | 深圳市朗科科技有限公司 | Method for increasing speed of writing data into flash memory disk |
CN1845082A (en) * | 2006-04-29 | 2006-10-11 | 北京飞天诚信科技有限公司 | Safety writing method for flash memory |
CN1991788A (en) * | 2005-12-30 | 2007-07-04 | 深圳市桑达实业股份有限公司 | Method for treating broken block when using flash memory in tax-controlled cashing machine |
-
2007
- 2007-11-19 CN CN2007101878390A patent/CN101441552B/en active Active
-
2009
- 2009-11-26 HK HK09111049.9A patent/HK1133309A1/en unknown
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1728282A (en) * | 2004-07-30 | 2006-02-01 | 深圳市朗科科技有限公司 | Method for increasing speed of writing data into flash memory disk |
CN1991788A (en) * | 2005-12-30 | 2007-07-04 | 深圳市桑达实业股份有限公司 | Method for treating broken block when using flash memory in tax-controlled cashing machine |
CN1845082A (en) * | 2006-04-29 | 2006-10-11 | 北京飞天诚信科技有限公司 | Safety writing method for flash memory |
Non-Patent Citations (1)
Title |
---|
田奕.基于Mass Storge协议的USB接口设计.《电子器件》.2005,第28卷(第3期),第684-685页. * |
Also Published As
Publication number | Publication date |
---|---|
CN101441552A (en) | 2009-05-27 |
HK1133309A1 (en) | 2010-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10810127B2 (en) | Solid-state hard disk and data access method for use with solid-state hard disk | |
US8386699B2 (en) | Method for giving program commands to flash memory for writing data according to a sequence, and controller and storage system using the same | |
CN109783017B (en) | Storage device bad block processing method and device and storage device | |
US20100287217A1 (en) | Host control of background garbage collection in a data storage device | |
US20130013853A1 (en) | Command executing method, memory controller and memory storage apparatus | |
US11126561B2 (en) | Method and system for organizing NAND blocks and placing data to facilitate high-throughput for random writes in a solid state drive | |
US20120131263A1 (en) | Memory storage device, memory controller thereof, and method for responding host command | |
US8516184B2 (en) | Data updating using mark count threshold in non-volatile memory | |
CN102203717A (en) | Solid state drive optimizer | |
TWI489466B (en) | Memory erasing method, memory controller and memory storage apparatus | |
CN102971698B (en) | Snapshot data-processing method and system, storage system and snapshot agency | |
JP2005293205A (en) | Storage control device, control method, and control program | |
US8812772B2 (en) | Data merging method for non-volatile memory and controller and storage apparatus using the same | |
US20220035736A1 (en) | Data processing method for controlling write speed of memory device to avoid significant write delay and data storage device utilizing the same | |
US20220269609A1 (en) | Apparatus and method for improving input/output throughput of memory system | |
CN101908021B (en) | Flash memory erasing-writing method and flash memory | |
CN101364437A (en) | Method capable of loss equalization of flash memory and application thereof | |
CN104598161A (en) | Data reading and writing method and device and data storage structure | |
CN101441552B (en) | Flash memory medium bad block processing method | |
CN107704338A (en) | A kind of data reconstruction method and device of data storage type flash | |
CN101872318B (en) | Data access method for flash memory and storage system and controller thereof | |
US11662940B2 (en) | Data storage device and data processing method for restoring MLC/TLC memory to avoid degradation of access performance of a memory device caused by word line short | |
TWI436209B (en) | Memory management table proceesing method, memory controller and memory storage apparatus | |
CN109002265B (en) | Data processing method and related device | |
CN101770426A (en) | Storage method and storage equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1133309 Country of ref document: HK |
|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: GR Ref document number: 1133309 Country of ref document: HK |