CN102207905A - System recovery method, storage media controller and storage system - Google Patents

System recovery method, storage media controller and storage system Download PDF

Info

Publication number
CN102207905A
CN102207905A CN2010101417983A CN201010141798A CN102207905A CN 102207905 A CN102207905 A CN 102207905A CN 2010101417983 A CN2010101417983 A CN 2010101417983A CN 201010141798 A CN201010141798 A CN 201010141798A CN 102207905 A CN102207905 A CN 102207905A
Authority
CN
China
Prior art keywords
data
memory
read
memory block
host computer
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
CN2010101417983A
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.)
Phison Electronics Corp
Original Assignee
Phison Electronics Corp
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 Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to CN2010101417983A priority Critical patent/CN102207905A/en
Publication of CN102207905A publication Critical patent/CN102207905A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a system recovery method, a storage media controller and a storage system. The system recovery method comprises the following steps of: dividing a plurality of storage addresses of corresponding storage media units into a first storage area and a second storage area; storing initial data from a host system in the storage addresses of the first storage area, storing update data for updating the initial data in the storage addresses of the second storage area, and establishing an address corresponding table to record update information corresponding to the storage addresses for storing the initial data; and clearing the update information recorded in the address corresponding table when a storage device is interrupted and newly coupled to the host system. Therefore, the setting of the system can be quickly recovered by the method.

Description

System recovery method, medium controller and storage system
Technical field
The medium controller and the storage system that the present invention relates to a kind of system recovery method and use the method.
Background technology
In computer system, memory storage is to be used to store data.Particularly, when memory storage was used as system disk (or title master disk), the storage space of this memory storage can be used to installing operating system and storage system setting data.In the operation of system disk, make the default data that are stored in the system disk be modified or cause the system file damage because of factor such as manual operation, virus infections or hacker attacks through regular meeting.For example, be example with teaching consuming energy brain or the industrial computer that is configured in the computer classroom, when student or operating personnel use computer, may change related setting, even carry out the program that contains virus.The base this, after the installation of complete operation system and application program, the computer control personnel can wish need readjust or reinstall operating system or application program to avoid computer because of improper use whenever computer is used the original state of still enough recovering computer after finishing.
In order to overcome this problem, the computer control personnel can be set at system disk anti-WriteMode, in case the locking system disk is write data by the unauthorized person.Yet the certain operations system can need write daily record shelves (log file) in system disk in start process, so be set to the start of preventing operating system under the WriteMode at system disk problem can take place.Therefore, this kind is in case WriteMode forbids that the method that writes of system disk need cooperate the setting of specific operating system or change operating system.
In addition, another kind of method is that the storage space of system disk is cut apart a back-up storage district, and the reflection shelves of preset operating system or application program are stored in this back-up storage district.Afterwards, when computer was started shooting again, the reflection shelves can be loaded on the start magnetic region to override operating system or the application program in the system disk from backup area.Yet this kind method need change Basic Input or Output System (BIOS) (BasicInput/Output System, setting BIOS).In addition, when the reflection shelves were big, the time that is written into the reflection shelves can cause the prolongation of required time of starting shooting, thereby causes the reduction of system effectiveness.
Summary of the invention
The invention provides a kind of system recovery method, its recovery system setting apace.
The invention provides a kind of medium controller, its recovery system setting apace.
The invention provides a kind of storage system, its recovery system setting apace.
The embodiment of the invention proposes a kind of system recovery method, is used for a memory storage, and wherein this memory storage has a plurality of memory addresss.The native system restoration methods comprises described a plurality of memory addresss is divided into one first memory block and one second memory block at least, and receives at least one first of a host computer system and write instruction and one first data.The native system restoration methods also comprise when these first data be when desiring to write to the memory address of first memory block, first data are write in the memory address of second memory block.The native system restoration methods also comprises sets up the lastest imformation of address corresponding tables with the memory address of record corresponding stored first data.The native system restoration methods also comprises removes the lastest imformation that is recorded in the corresponding tables of address when memory storage cuts off the power supply and is coupled to host computer system again.
The embodiment of the invention proposes a kind of medium controller, is used for the managed storage media units, and wherein this media units has a plurality of memory addresss.This memory storage comprises host interface, medium interface and medium management circuit.Host interface is coupled to the medium management circuit, in order to be coupled to host computer system.The medium interface is coupled to the medium management circuit, in order to be coupled to media units.The medium management circuit is in order to carry out the said system restoration methods.
The embodiment of the invention proposes a kind of storage system, and it comprises connector, media units and medium controller.Connector is in order to be coupled to host computer system.Media units has a plurality of memory addresss.The medium controller is coupled to media units and connector, and in order to carry out the said system restoration methods.
Based on above-mentioned, the embodiment of the invention can be effectively and apace recovery system set, avoid thus because manual operation careless mistake, virus infections or hacker attacks etc. factor caused changes by mistake default or system file damage.
For above-mentioned feature and advantage of the present invention can be become apparent,, and cooperate institute's accompanying drawing to be described in detail below below especially exemplified by embodiment.
Description of drawings
Figure 1A is the host computer system that one embodiment of the invention is used memory storage.
Figure 1B is the synoptic diagram of computer, input/output device and the memory storage of one embodiment of the invention.
Fig. 1 C is the host computer system of another embodiment of the present invention and the synoptic diagram of memory storage.
Fig. 2 is the summary calcspar of the memory storage shown in Figure 1A.
Fig. 3 is the summary calcspar of the medium controller of one embodiment of the invention.
Fig. 4 is the synoptic diagram of one embodiment of the invention managed storage media units 106.
Fig. 5 is the synoptic diagram of one embodiment of the invention management storage region.
Fig. 6 is that the data of one embodiment of the invention write example.
Fig. 7 is that another data of one embodiment of the invention write example.
Fig. 8 is the example of the address corresponding tables of one embodiment of the invention.
Fig. 9 is the separation magnetic region and the process flow diagram of setting up the address corresponding tables of the system recovery method of one embodiment of the invention.
Figure 10 be one embodiment of the invention system recovery method write process flow diagram with reading of data.
The main element symbol description:
1000: host computer system; 1100: computer;
1102: microprocessor; 1104: random access memory;
1106: input/output device; 1108: system bus;
1110: data transmission interface; 1202: mouse;
1204: keyboard; 1206: display;
1208: printer; 1212: coil with oneself;
1214: storage card; 1216: solid state hard disc;
1310: digital camera; The 1312:SD card;
The 1314:MMC card; 1316: memory stick;
The 1318:CF card; 1320: embedded memory storage;
100: memory storage; 102: connector;
104: the medium controller; 106: media units;
204: the medium management circuit; 206: host interface;
208: the medium interface; 252: memory buffer;
254: electric power management circuit; 256: Error-Correcting Circuit;
302: system region; 304: the memory block;
306: replace the district; 512: main storage area, first memory block;
522: temporary memory block, second memory block; 800: the address corresponding tables;
802: main storage area memory address field; 804: temporary storage area stores address field;
806: the lastest imformation field; 460 (0)~460 (H): logical blocks;
410 (0)~410 (S), 420 (0)~420 (N), 440 (0)~440 (R): physical blocks;
S901, S903, S905, S907, S909, S911, S913, S915, S917, S919, S921, S923: the step of system recovery method.
Embodiment
Figure 1A is the host computer system that one embodiment of the invention is used memory storage.
Please refer to Figure 1A, host computer system 1000 generally comprises computer 1100 and I/O (input/output, I/O) device 1106.Computer 1100 comprise microprocessor 1102, random access memory (random accessmemory, RAM) 1104, system bus 1108 and data transmission interface 1110.Input/output device 1106 comprises mouse 1202, keyboard 1204, the display 1206 and printer 1208 as Figure 1B.It must be appreciated, the unrestricted input/output device 1106 of the device shown in Figure 1B, input/output device 1106 can also comprise other devices.
Memory storage 100 is to couple by data transmission interface 1110 other elements with host computer system 1000 in embodiments of the present invention.Data can be write to memory storage 100 or reading of data from memory storage 100 by microprocessor 1102, random access memory 1104 with the processing of input/output device 1106.For example, memory storage 100 can be carry-on dish 1212, storage card 1214 or solid state hard disc (Solid State Drive, SSD) 1216 shown in Figure 1B.
Generally speaking, host computer system 1000 can be substantially for storing any system of data.Though in the present embodiment, host computer system 1000 is to explain with computer system, yet host computer system 1000 can be systems such as digital camera, video camera, communicator, message player or video signal player in another embodiment of the present invention.For example, in host computer system is digital camera (video camera) 1310 o'clock, and duplicative nonvolatile memory stores device then is its employed SD card 1312, mmc card 1314, memory stick (memory stick) 1316, CF card 1318 or embedded memory storage 1320 (shown in Fig. 1 C).Embedded memory storage 1320 comprise the built-in multimedia card (Embedded MMC, eMMC).What deserves to be mentioned is that the built-in multimedia card is directly to be coupled on the substrate of host computer system.
Fig. 2 is the summary calcspar of the memory storage shown in Figure 1A.
Please refer to Fig. 2, memory storage 100 comprises connector 102, medium controller 104 and media units 106.
Connector 102 is to be coupled to medium controller 104 and in order to be coupled to host computer system 1000.In the present embodiment, connector 102 is Serial Advanced Technology Attachment (Serial Advanced TechnologyAttachment, a SATA) connector.Yet, it must be appreciated and the invention is not restricted to this, connector 102 can also be USB (universal serial bus) (Universal Serial Bus, USB) connector, Institute of Electrical and Electric Engineers (Institute of Electrical and Electronic Engineers, IEEE) 1394 connectors, high-speed peripheral component connecting interface (Peripheral Component Interconnect Express, PCI Express) connector, secure digital (secure digital, SD) interface connector, memory stick (Memory Stick, MS) interface connector, multimedia storage card (Multi Media Card, MMC) interface connector, compact flash (Compact Flash, CF) interface connector, integrated driving electrical interface (Integrated DeviceElectronics, IDE) connector or other connectors that is fit to.
Medium controller 104 can be carried out with example, in hardware or real a plurality of logic locks or the steering order of doing of firmware form, and carries out the runnings such as writing and read of data in media units 106 according to the instruction of host computer system 1000.
Fig. 3 is the summary calcspar of the medium controller of one embodiment of the invention.
Please refer to Fig. 3, medium controller 104 comprises medium management circuit 204, host interface 206 and medium interface 208.
Medium management circuit 204 is in order to the overall operation of control volume controller 104.Specifically, medium management circuit 204 has a plurality of steering orders, and when memory storage 100 runnings, these a little steering orders can be performed with the data access mechanism according to present embodiment comes managed storage media units 106 with medium management mechanism.This a little data accesses mechanism and medium management mechanism will cooperate graphic elaborating in following.
In the present embodiment, medium management circuit 204 is to do in fact with a firmware form.For example, medium management circuit 204 has a microprocessor unit (not shown) and a read only memory (not shown), and these a little steering orders are by imprinting so far in the ROM (read-only memory).When memory storage 100 runnings, these a little steering orders can be carried out to finish the data access mechanism and medium management mechanism according to the embodiment of the invention by microprocessor unit.
In another embodiment of the present invention, the steering order of medium management circuit 204 can also the procedure code form be stored in the specific region (for example, being exclusively used in the system region of storage system data in the memory chips) of media units 106.In addition, medium management circuit 204 has a microprocessor unit (not shown), a read only memory (not shown) and a random access memory (not shown).Particularly, this read only memory has one and drives the sign indicating number section, and when medium controller 104 is enabled, the steering order that this driving sign indicating number section of microprocessor unit execution earlier will be stored in the medium management circuit 204 in the media units 106 is loaded in the random access memory of medium management circuit 204, reruns these a little steering orders afterwards to carry out the data access mechanism and the memory management mechanism of the embodiment of the invention.In addition, in another embodiment of the present invention, the steering order of medium management circuit 204 can also a hardware form be done in fact.
Host interface 206 is instruction and the data that are coupled to medium management circuit 204 and transmitted in order to reception and identification host computer system 1000.That is to say that instruction that host computer system 1000 is transmitted and data can be sent to medium management circuit 204 by host interface 206.In the present embodiment, host interface 206 is that corresponding connector 102 is the SATA interface.Yet, it must be appreciated to the invention is not restricted to this that host interface 206 can also be PATA interface, USB interface, IEEE 1394 interfaces, PCI Express interface, SD interface, MS interface, MMC interface, CF interface, ide interface or other data transmission interfaces that is fit to.
Medium interface 208 is to be coupled to medium management circuit 204 and in order to access media units 106.That is to say that the data of desiring to write to media units 106 can be converted to 106 receptible forms of media units via medium interface 208.
In an embodiment of the present invention, medium controller 104 also comprises memory buffer 252.Memory buffer 252 is to be coupled to medium management circuit 204 and in order to the temporary data that come from the data and instruction of host computer system 1000 or come from media units 106.
In an embodiment of the present invention, medium controller 104 also comprises electric power management circuit 254.Electric power management circuit 254 is to be coupled to medium management circuit 204 and in order to the power supply of control store device 100.
In an embodiment of the present invention, medium controller 104 also comprises Error-Correcting Circuit 256.Error-Correcting Circuit 256 is to be coupled to medium management circuit 204 and in order to carry out an error-correcting routine to guarantee the correctness of data.Specifically, when receiving, medium management circuit 204 writes when instruction from host computer system 1000, Error-Correcting Circuit 256 can produce corresponding bug check and correcting code (Error Checking and Correcting Code for the corresponding data that write that this writes instruction, ECCCode), and medium management circuit 204 this can be write data and write in the media units 106 with corresponding error-correcting code.Afterwards, when medium management circuit 204 can read the error-correcting code of this data correspondence during reading of data simultaneously from media units 106, and Error-Correcting Circuit 256 can be according to the data execution error correction program of this error-correcting code to being read.
Referring again to Fig. 2, media units 106 is to be coupled to medium controller 104, and in order to the storage data.In the present embodiment, media units 106 is the duplicative nonvolatile memory, and has a plurality of physical blocks.Each physical blocks has a plurality of physical page respectively, wherein can independently write corresponding to the physical page of same physical blocks and the physical page of same physical blocks need be erased simultaneously.Specifically, physical blocks is the least unit of erasing.That is each physical blocks contains the memory cell of being erased in the lump of minimal amount.Each physical blocks has several physical page, and physical page is the minimum unit of sequencing.Change speech, physical page is the minimum unit that writes data or reading of data.Each physical page generally includes user data field and redundant area.The user data field is in order to storage user's data, and redundant area is in order to the data (for example, bug check and correcting code) of storage system.For example, media units 106 is a flash memory die.Yet, the invention is not restricted to this, media units 106 is other duplicative nonvolatile memory wafers, disk or other mediums also.
Fig. 4 is the synoptic diagram of one embodiment of the invention managed storage media units 106.
The medium management circuit 204 of medium controller 104 logically is grouped into physical blocks system region 302, memory block 304 and replaces district 306.
The physical blocks 410 (0)~410 (S) that belongs to system region 302 in logic is in order to the register system data.This system data comprises about the manufacturer of media units 106 and model, the physical blocks number of media units 106, page number of each physical blocks etc.
The physical blocks 420 (0)~420 (N) that belongs to memory block 304 in logic is the data that write in order to host system 1000.That is to say the data that memory storage 100 can use the physical blocks that is grouped into memory block 304 to come host system 1000 practically to be write.
Particularly, medium management circuit 204 can be grouped into data field and spare area (not shown) with the physical blocks of memory block 304.In addition, when medium management circuit 204 was desired to write data to memory block 304, medium management circuit 204 can use the physical blocks of data field and spare area to write data with rotating.For example, when medium management circuit 204 was desired to write data to memory block 304, medium management circuit 204 can extract physical blocks and write data with the physical blocks in the replacement data district from the spare area.In order to make host computer system 1000 access successfully store the physical blocks of data in the mode of rotating, the logical blocks 460 (0)~460 (H) of the physical blocks that medium management circuit 204 can configuration mapping memory blocks 304 is for host computer system 1000 accesses.Specifically, host computer system 1000 only needs to assign data access command according to logical blocks 460 (0)~460 (H), and medium management circuit 204 can write data practically according to the data access command of being assigned and logical blocks-physical blocks mapping table in the physical blocks of being shone upon.At this, logical blocks also is called memory address.
Belonging to the physical blocks 440 (0)~440 (R) that replaces in the district 306 in logic is to replace physical blocks.For example, media units 106 can be reserved 4% physical blocks and uses as changing when dispatching from the factory.That is to say that when system region 302 was damaged with the physical blocks in the memory block 304, the physical blocks of reserving in replacing district 306 was in order to replacing damaged physical blocks (that is bad physical blocks (bad block)).Therefore, if replace when still having normal physical blocks in the district 306 and the physical blocks damage taking place, medium management circuit 204 can extract the physical blocks that normal physical blocks is changed damage from replace district 306.If when no normal physical blocks and generation physical blocks were damaged in the replacement district 306, then memory storage 100 will be declared to be write protection (write protect) state, and can't write data again.
Particularly, the quantity of the physical blocks in system region 302, memory block 304 and replacement district 306 can be different according to different storer specifications.In addition, it must be appreciated that in the running of memory storage 100, physical blocks is associated to system region 302, memory block 304 can dynamically change with the grouping relation that replaces district 306.For example, when the physical blocks in the memory block is damaged and the physical blocks that is substituted the district when replacing, the physical blocks that then replaces the district originally can be associated to the memory block.
Fig. 5 is the synoptic diagram of one management storage region according to the present invention.
Please refer to Fig. 5, in the medium management mechanism according to present embodiment, medium management circuit 204 can be grouped into the logical blocks 460 (0)~460 (K-1) of memory block 304 first memory block 512 (hereinafter referred to as the main storage area) and logical blocks 460 (K)~460 (H) is grouped into second memory block 522 (hereinafter referred to as temporary memory block).
In addition, the logical blocks 460 (K)~460 (H) that medium management circuit 204 will be kept in memory block 522 corresponds to the logical blocks 460 (0)~460 (K-1) in main storage area 512 one to one, with the temporary address as each logical blocks in the main storage area 512.
At this, medium management circuit 204 can offer host computer system 1000 with main storage area 512 and come access, and can not offer host computer system 1000 and come access keeping in memory block 522.For example, when the capacity of supposing memory block 304 was 4G (Gigabyte), medium management circuit 204 can be used as the logical blocks of half main storage area 512 and second half logical blocks is used as temporary memory block 522.And, when memory storage 100 is coupled to host computer system 1000 and receive device characteristic inquiry instruction, medium management circuit 204 can send " memory storage 100 is other for mass storage class " and the message of " but storage space is main storage area (that is the storage space of 2G) " to host computer system 1000.That is to say that host computer system 1000 only can identify main storage area 512 and access data in main storage area 512.Particularly, host computer system 1000 can't be known the existence of temporary memory block 522.
In the present embodiment, medium management circuit 204 can be set at the pattern of writing or anti-WriteMode with main storage area 512 according to the steering order (for example, manufacturer's instruction (Vendor Command)) that host computer system 1000 is assigned.
Particularly, be set under the pattern of writing in main storage area 512, write when instruction when medium management circuit 204 receives from host computer system 1000, medium management circuit 204 can write to corresponding these data that write instruction in the main storage area 512.Be set under the anti-WriteMode in main storage area 512, when medium management circuit 204 receives from host computer system 1000 when writing instruction, medium management circuit 204 can write to corresponding these data that write instruction in the temporary memory block 522.
That is to say, be set under the anti-WriteMode that medium management circuit 204 can write to the data of desiring to write to the logical blocks in main storage area 512 in the logical blocks corresponding in the temporary memory block 522 in main storage area 512.
Fig. 6 is that data write example according to an embodiment of the invention.
Please refer to Fig. 6, if do not store any data and main storage area 512 has been set under the situation of the pattern of writing in memory block 304, when host computer system 1000 during according to the operating in the memory storage 100 installing operating system or application program or write data of computer control person, medium management circuit 204 can be according to writing the logical blocks 460 (0)~460 (999) that instruction writes to data in main storage area 512.Particularly, for after the installation of complete operation system or application program, default can at random not revised, computer control person can transmit the steering order that requires the main storage area to be set at anti-WriteMode via host computer system 1000 and give memory storage 100, and medium management circuit 204 can be set at anti-WriteMode with main storage area 512 according to this steering order.
Fig. 7 is that another data of one embodiment of the invention write example.
Please refer to Fig. 7, if be set under the situation of anti-WriteMode in store status shown in Figure 6 and main storage area, when host computer system 1000 desires to update stored in data in the logical blocks 460 (48)~460 (49) in main storage area 512, medium management circuit 204 can with this more new data write to accordingly in the logical blocks 460 (K+48)~460 (K+49) in working area 522.
Particularly, under store status shown in Figure 6, when host computer system 1000 desired to read the logical blocks 460 (0)~460 (47) that is stored in main storage area 512 or the data in the logical blocks 460 (50)~460 (999), medium management circuit 204 did not have the more new data of counterlogic block 460 (0)~460 (47) and logical blocks 460 (50)~460 (999) in can identification working areas 522.At this moment, medium management circuit 204 can read corresponding data and send the data that read to host computer system 200 from the logical blocks in main storage area 512.In addition, when host computer system 1000 desired to read data in the logical blocks 460 (48)~460 (49) that is stored in main storage area 512, medium management circuit 204 had the more new data of counterlogic block 460 (48)~460 (49) in can identification working areas 522.At this moment, medium management circuit 204 can read corresponding data and send the data that read to host computer system 200 from the logical blocks 460 (K+48)~460 (K+49) of temporary memory block 522.
In the present embodiment, be set under the anti-WriteMode in main storage area 512, medium management circuit 204 can be set up and safeguard the lastest imformation of address corresponding tables with the logical blocks in record main storage area 512.
Fig. 8 is the example of the address corresponding tables of one embodiment of the invention.
Please scheme with reference to 8, address corresponding tables 800 comprises main storage area memory address field 802, temporary storage area stores address field 804 and lastest imformation field 806.Temporary storage area stores address field 804 is in order to the pairing temporary address of logical blocks of record main storage area memory address field 802.The information whether lastest imformation field 806 has been updated in order to the data of recording storage in the logical blocks in main storage area 512.For example, when the value that is recorded in lastest imformation field 806 is ' 1 ' time, the data that expression is stored in the logical blocks that main storage area memory address field 802 write down are updated.Anti-, when the value that is recorded in lastest imformation field 806 be ' 0 ' time, the data of representing to be stored in the logical blocks that main storage area memory address field 802 write down are not updated.That is to say, when the logical blocks of temporary memory block 522 has been used to store the more new data of the data that are used to update stored in main storage area 522, the lastest imformation of medium management circuit 204 meetings this logical blocks of mark in the lastest imformation field 806 of address corresponding tables 800, the data that are stored in main storage area 522 with expression are updated.It must be appreciated, although present embodiment is with numerical value ' 1 ' with ' 0 ' represent whether data are updated, yet, the invention is not restricted to this, other symbols or literal also can be used for representing whether data are updated.
What deserves to be mentioned is that when memory storage 100 restarted (for example, memory storage 100 is de-energized and is coupled to again host computer system 1000), medium management circuit 204 can be removed the lastest imformation in the address corresponding tables 800.For example, medium management circuit 204 can revert to values all in the lastest imformation field 806 ' 0 ', do not store any more new data to represent temporary memory block 522.Base this, when memory storage 100 was restarted, the data of 1000 accesses of host computer system can revert to the data of initially being stored.That is to say that when host computer system 1000 was started shooting again, the operating environment of host computer system 1000 and default can return to the state before main storage area 512 is set to anti-WriteMode.For example, computer control person installs operating system or application program and main storage area 512 is set to anti-WriteMode in main storage area 512 after, when the user restarted host computer system 1000, host computer system 1000 can start according to initial operating system of installing or application program.
What deserves to be mentioned is that in the present embodiment, the capacity in main storage area 512 is the capacity that are same as temporary memory block 522, and the logical blocks of temporary memory block 522 is the temporary addresses that are used as the logical blocks in main storage area 512 in mode one to one.Yet, the invention is not restricted to this, and in another embodiment of the present invention, the capacity of temporary memory block 522 also can be less than the capacity in main storage area 512, and the logical blocks of temporary memory block 522 is to store the more new data that comes from host computer system 1000 in the mode of rotating.
Fig. 9 is the separation magnetic region and the process flow diagram of setting up the address corresponding tables of the system recovery method of one embodiment of the invention.
Please refer to Fig. 9, when memory storage 100 was initialised (for example, format), the logical blocks of the near small part of medium management circuit 204 meetings was divided into main storage area 512 and temporary memory block 522 in step S901.
And medium management circuit 204 can be set up address corresponding tables 800 with corresponding relation and the lastest imformation of record main storage area 512 with the logical blocks of temporary memory block 522 in step S903.
Figure 10 be one embodiment of the invention system recovery method write process flow diagram with reading of data.
Please refer to Figure 10, when memory storage 100 was coupled to host computer system 1000, at first, medium management circuit 204 can be removed the lastest imformation that is recorded in the address corresponding tables 800 in step S905.
Then, medium management circuit 204 waits host computer system and assigns host command that host command and judgement assign for writing instruction or reading command in step S907.
If when the host command of being assigned in step S907 instructed for writing, then medium management circuit 204 can judge whether main storage area 512 is set to anti-WriteMode in step S909.If main storage area 512 is not set to when preventing WriteMode, then 204 meetings of medium management circuit write to the data that correspondence write instruction in the counterlogic block in main storage area 512 in step S911.When if the main storage area is set to anti-WriteMode, then the data that medium management circuit 204 can write correspondence instruction in step S913 write in the counterlogic block of temporary memory block 522, and in step S915 scheduler corresponding tables 800.
If when the host command of being assigned in step S907 is reading command, then medium management circuit 204 can judge whether main storage area 512 is set to the pattern of writing in step S917.If main storage area 512 is set to when writing pattern, then medium management circuit 204 can read the data of corresponding this reading command and send the data that read to host computer system 1000 from main storage area 512 in step S919.If main storage area 512 is not set to when writing pattern, then medium management circuit 204 can judge whether the data that are stored in the pairing logical blocks of this reading command are updated according to address corresponding tables 800 in step S921.
If be stored in data in the pairing logical blocks of this reading command when not being updated, then step S919 can be performed.If be stored in data in the pairing logical blocks of this reading command when being updated, then medium management circuit 204 can read corresponding data and send the data that read to host computer system 1000 according to address corresponding tables 800 from temporary memory block 522 in step S923.Behind step S911, S915, S919 and S923, medium management circuit 204 meeting execution in step S907 are to wait for next host command.And when memory storage 100 was de-energized, program shown in Figure 10 can finish.
In sum, according to the system recovery method of the embodiment of the invention storage space of memory storage is divided into main storage area and temporary memory block, and is set under the anti-WriteMode in the main storage area data storage that host computer system write is write down lastest imformation in temporary memory block and with the address corresponding tables.In addition, when memory storage was restarted, the lastest imformation in the corresponding tables of address can be eliminated, and host computer system can access be set the data of being stored before the anti-WriteMode thus.The base this, the embodiment of the invention can avoid the data in main storage area at random to be revised effectively, and default can be returned to original state apace when memory storage is restarted.
Though the present invention discloses as above with embodiment; right its is not in order to qualification the present invention, any person of ordinary skill in the field, without departing from the spirit and scope of the present invention; when doing a little change and retouching,, protection scope of the present invention is as the criterion so working as the scope of being protected with claim.

Claims (17)

1. a system recovery method is used for a memory storage, and this system recovery method comprises:
To be divided into one first memory block and one second memory block at least to a plurality of memory addresss that should memory storage;
Receive at least one first of a host computer system and write instruction and one first data;
When these first data are when desiring to write to the memory address of this first memory block, these first data are write in the memory address of this second memory block;
Set up the lastest imformation of an address corresponding tables with the memory address of these first data of record corresponding stored; And
When cutting off the power supply and be coupled to this host computer system again, removes by this memory storage this lastest imformation that is recorded in this address corresponding tables.
2. system recovery method according to claim 1 also comprises:
From this host computer system, receive one first reading command, and judge this lastest imformation that in this address corresponding tables, whether has the memory address of should first reading command desiring to read;
When in this address corresponding tables, not having this lastest imformation, then from this first memory block, read to the data should first reading command desiring to read and with the data that read and send this host computer system to; And
When in this address corresponding tables, having this lastest imformation, then from this second memory block, read to the data should first reading command desiring to read and with the data that read and send this host computer system to according to this lastest imformation.
3. system recovery method according to claim 1, wherein this first memory block is an anti-WriteMode, and this system recovery method also comprises:
According to a steering order of this host computer system this first memory block is set at one and writes pattern.
4. system recovery method according to claim 3 also comprises:
One preset data that will come from this host computer system writes in the memory address of this first memory block; And
This steering order according to this host computer system after in the memory address that this preset data is write to this first memory block is set at this anti-WriteMode with this first memory block.
5. system recovery method according to claim 4, wherein before this steering order according to this host computer system was set at this step that writes pattern with this first memory block, this system recovery method also comprised:
From this host computer system, receive the second reading instruction fetch desire to read the memory address that is stored in this first memory block, judge this lastest imformation that in this address corresponding tables, whether has the memory address of should the second reading instruction fetch desiring to read,
Wherein when this lastest imformation of in this address corresponding tables, not having the memory address should the second reading instruction fetch desiring to read, then from this first memory block, read to the data should the second reading instruction fetch desiring to read and with the data that read and send this host computer system to, and when this lastest imformation of in this address corresponding tables, having the memory address should the second reading instruction fetch desiring to read, then from this second memory block, read to the data should the second reading instruction fetch desiring to read and with the data that read and send this host computer system to according to this lastest imformation; And
Wherein after this preset data that will come from this host computer system write to step in the memory address of this first memory block, this system recovery method also comprised:
From this host computer system, receive a third reading instruction fetch of desiring to read the memory address that is stored in this first memory block;
From this first memory block, read data to should the third reading instruction fetch desiring to read; And
Send the data that read to this host computer system.
6. system recovery method according to claim 3 also comprises:
From this host computer system, receive one second write instruction with to should second writing one second data of instruction, these second data are write to this first memory block.
7. system recovery method according to claim 1, the step that wherein described a plurality of memory addresss is divided at least this first memory block and this second memory block comprises:
The described a plurality of memory addresss of near small part are divided into this first memory block and this second memory block with same capability; And
As a plurality of temporary addresses, to memory address that should first memory block, wherein each temporary address is to one of them of memory address that should first memory block with respectively with the memory address of this second memory block.
8. system recovery method according to claim 7, the step that wherein these first data is write in the memory address of this second memory block comprises:
These first data of storage in the temporary address of the memory address of these first data of corresponding stored.
9. a medium controller is used to manage a media units, and this medium controller comprises:
One host interface is in order to be coupled to a host computer system;
One medium interface is in order to be coupled to this media units; And
One medium management circuit is coupled to this host interface and this medium interface, and wherein this medium management circuit is in order to carry out follow procedure at least:
To be divided into one first memory block and one second memory block at least to a plurality of memory addresss that should memory storage;
Receive at least one first of a host computer system and write instruction and one first data;
When these first data are when desiring to write to the memory address of this first memory block, these first data are write in the memory address of this second memory block;
Set up the lastest imformation of an address corresponding tables with the memory address of these first data of record corresponding stored; And
When cutting off the power supply and be coupled to this host computer system again, removes by this memory storage this lastest imformation that is recorded in this address corresponding tables.
10. medium controller according to claim 9,
Wherein this medium management circuit is also in order to receiving one first reading command from this host computer system, and judges this lastest imformation that whether has in this address corresponding tables the memory address of should first reading command desiring to read,
Wherein when not having this lastest imformation in this address corresponding tables, this medium management circuit also sends this host computer system in order to read to the data should first reading command desiring to read and with the data that read from this first memory block, and
Wherein when having this lastest imformation in this address corresponding tables, this medium management circuit also sends this host computer system in order to read from this second memory block according to this lastest imformation to the data should first reading command desiring to read and with the data that read.
11. medium controller according to claim 9, wherein this first memory block is an anti-WriteMode, and this medium management circuit also is set at one in order to the steering order according to this host computer system with this first memory block and writes pattern.
12. medium controller according to claim 11, wherein this medium management circuit also writes in the memory address of this first memory block in order to a preset data that will come from this host computer system, and this steering order according to this host computer system is set at this anti-WriteMode with this first memory block after in the memory address that this preset data is write to this first memory block.
13. medium controller according to claim 12,
Wherein this medium management circuit also receives the second reading instruction fetch desire to read the memory address that is stored in this first memory block in order to this first memory block is set at this in this steering order according to this host computer system before writing pattern from this host computer system, whether judgement has this lastest imformation to the memory address of should the second reading instruction fetch desiring to read in this address corresponding tables
Wherein when this lastest imformation of in this address corresponding tables, not having the memory address should the second reading instruction fetch desiring to read, this medium management circuit also sends this host computer system in order to read to the data should the second reading instruction fetch desiring to read and with the data that read from this first memory block
Wherein when this lastest imformation of in this address corresponding tables, having the memory address should the second reading instruction fetch desiring to read, this medium management circuit also sends this host computer system in order to read from this second memory block according to this lastest imformation to the data should the second reading instruction fetch desiring to read and with the data that read
Wherein this medium management circuit also receives a third reading instruction fetch of desiring to read the memory address that is stored in this first memory block in order to back in the memory address that writes to this first memory block in this preset data that will come from this host computer system from this host computer system, reads from this first memory block to the data should the third reading instruction fetch desiring to read and with the data that read and sends this host computer system to.
14. medium controller according to claim 9, wherein this media units is a duplicative nonvolatile memory wafer, described a plurality of memory address maps to a plurality of physical blocks of this duplicative nonvolatile memory wafer, described a plurality of physical blocks has a plurality of physical page respectively, and the physical page of each described a plurality of physical blocks can be written into and side by side be erased independently.
15. a storage system comprises:
A connector is in order to be coupled to a host computer system;
One media units; And
One medium controller is coupled to this media units and this connector, in order to carry out follow procedure at least:
To be divided into one first memory block and one second memory block at least to a plurality of memory addresss that should media units;
Receive at least one first of a host computer system and write instruction and one first data;
When these first data are when desiring to write to the memory address of this first memory block, these first data are write in the memory address of this second memory block;
Set up the lastest imformation of an address corresponding tables with the memory address of these first data of record corresponding stored; And
When cutting off the power supply and be coupled to this host computer system again, removes by this memory storage this lastest imformation that is recorded in this address corresponding tables.
16. storage system according to claim 15,
Wherein this medium controller is also in order to receiving one first reading command from this host computer system, and judges this lastest imformation that whether has in this address corresponding tables the memory address of should first reading command desiring to read,
Wherein when not having this lastest imformation in this address corresponding tables, this medium controller also sends this host computer system in order to read to the data should first reading command desiring to read and with the data that read from this first memory block, and
Wherein when having this lastest imformation in this address corresponding tables, this medium controller also sends this host computer system in order to read from this second memory block according to this lastest imformation to the data should first reading command desiring to read and with the data that read.
17. storage system according to claim 15, wherein this media units is a duplicative nonvolatile memory wafer, described a plurality of memory address maps to a plurality of physical blocks of this duplicative nonvolatile memory wafer, described a plurality of physical blocks has a plurality of physical page respectively, and the physical page of each described a plurality of physical blocks can be written into and side by side be erased independently.
CN2010101417983A 2010-03-30 2010-03-30 System recovery method, storage media controller and storage system Pending CN102207905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101417983A CN102207905A (en) 2010-03-30 2010-03-30 System recovery method, storage media controller and storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101417983A CN102207905A (en) 2010-03-30 2010-03-30 System recovery method, storage media controller and storage system

Publications (1)

Publication Number Publication Date
CN102207905A true CN102207905A (en) 2011-10-05

Family

ID=44696749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101417983A Pending CN102207905A (en) 2010-03-30 2010-03-30 System recovery method, storage media controller and storage system

Country Status (1)

Country Link
CN (1) CN102207905A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678162A (en) * 2012-09-12 2014-03-26 群联电子股份有限公司 System data storage method, memorizer controller and memorizer storing device
CN104182293A (en) * 2013-05-22 2014-12-03 群联电子股份有限公司 Data writing method, memory storage device and memory controller
CN104424115A (en) * 2013-09-05 2015-03-18 联想(北京)有限公司 Method for restoring preset status of electronic device, memory device and electronic device
CN104932831A (en) * 2014-03-20 2015-09-23 华邦电子股份有限公司 Serial NAND flash memory and management method for managing built-in variable bad sectors of serial NAND flash memory
CN108121680A (en) * 2016-11-30 2018-06-05 三星电子株式会社 Storage device, electronic system and the method for operating electronic device
CN110678849A (en) * 2017-12-12 2020-01-10 谷歌有限责任公司 Automatic recovery of unstable mobile devices
CN111666177A (en) * 2020-05-07 2020-09-15 中国石油天然气股份有限公司 Gas-liquid two-phase flowmeter and meter data storage method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060282641A1 (en) * 2005-06-13 2006-12-14 Takeo Fujimoto Storage controller and method for controlling the same
CN1965300A (en) * 2004-06-04 2007-05-16 莱纳索夫特技术公司 Apparatus and method for protecting system data on computer hard-disk

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1965300A (en) * 2004-06-04 2007-05-16 莱纳索夫特技术公司 Apparatus and method for protecting system data on computer hard-disk
US20060282641A1 (en) * 2005-06-13 2006-12-14 Takeo Fujimoto Storage controller and method for controlling the same

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678162A (en) * 2012-09-12 2014-03-26 群联电子股份有限公司 System data storage method, memorizer controller and memorizer storing device
CN104182293A (en) * 2013-05-22 2014-12-03 群联电子股份有限公司 Data writing method, memory storage device and memory controller
CN104182293B (en) * 2013-05-22 2017-06-30 群联电子股份有限公司 Method for writing data, memory storage apparatus and Memory Controller
CN104424115A (en) * 2013-09-05 2015-03-18 联想(北京)有限公司 Method for restoring preset status of electronic device, memory device and electronic device
CN104932831A (en) * 2014-03-20 2015-09-23 华邦电子股份有限公司 Serial NAND flash memory and management method for managing built-in variable bad sectors of serial NAND flash memory
CN104932831B (en) * 2014-03-20 2018-03-30 华邦电子股份有限公司 Serially with the management method of non-formula flash memories and its built-in type variable bad block
CN108121680A (en) * 2016-11-30 2018-06-05 三星电子株式会社 Storage device, electronic system and the method for operating electronic device
CN108121680B (en) * 2016-11-30 2023-03-10 三星电子株式会社 Memory device, electronic system and method for operating electronic device
CN110678849A (en) * 2017-12-12 2020-01-10 谷歌有限责任公司 Automatic recovery of unstable mobile devices
CN110678849B (en) * 2017-12-12 2023-07-14 谷歌有限责任公司 Method and computing device for automatic recovery
CN111666177A (en) * 2020-05-07 2020-09-15 中国石油天然气股份有限公司 Gas-liquid two-phase flowmeter and meter data storage method
CN111666177B (en) * 2020-05-07 2023-06-30 中国石油天然气股份有限公司 Meter data storage method for gas-liquid two-phase flowmeter

Similar Documents

Publication Publication Date Title
TWI515735B (en) Data erasing method, memory control circuit unit and memory storage apparatus
TWI423026B (en) Data writing method, memory controller and memory storage apparatus
CN102207905A (en) System recovery method, storage media controller and storage system
CN102096561B (en) Hierarchical data storage processing method, device and storage equipment
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
CN102890655B (en) Memory storage device, memory controller and valid data recognition method thereof
CN103853566A (en) Basic input output system (BIOS) updating system and method
CN104793891A (en) Data write-in method, memorizer control circuit unit and memorizer storage device
US20110231621A1 (en) System recovery method, and storage medium controller and storage system using the same
CN102446137B (en) Method for writing data, Memory Controller and memorizer memory devices
CN102200946B (en) Data access method, memory controller and storage system
CN103106148B (en) Block management method, storage controller and storage storing device
CN102736861B (en) Memory configuration method, Memory Controller and memorizer memory devices
CN103578566A (en) Memory storage apparatus and restoration method thereof
CN103389941B (en) Storer formatting method, Memory Controller and memory storage apparatus
CN102800357A (en) Program code loading and accessing methods, memory controller and storage device of memory
CN102053920B (en) Data writing method, flash memory controller and flash memory system
CN102109965A (en) Flash memory storage system, flash memory controller, computer system and simulation method
CN102467459B (en) Data write method, memory controller and memory device
CN102043724B (en) For the block management method of flash memory, controller and storage system
CN102110056B (en) Flash memory management method, flash memory controller and flash memory storage system
CN112988069B (en) Memory management method, memory storage device and memory controller
CN102087632B (en) Data storage method for flash memory, controller and storage system
CN102467460B (en) Data management method, memory controller and memory storage device
CN103377132A (en) Memory space management method, memory controller and memory storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20111005