CN1598789A - Method of reading -writing data using disk file virtual flash - Google Patents

Method of reading -writing data using disk file virtual flash Download PDF

Info

Publication number
CN1598789A
CN1598789A CNA031468756A CN03146875A CN1598789A CN 1598789 A CN1598789 A CN 1598789A CN A031468756 A CNA031468756 A CN A031468756A CN 03146875 A CN03146875 A CN 03146875A CN 1598789 A CN1598789 A CN 1598789A
Authority
CN
China
Prior art keywords
disk
file
flash
flash memory
reading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA031468756A
Other languages
Chinese (zh)
Other versions
CN1304959C (en
Inventor
宋强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen New Greennet Technologies Co ltd
Shenzhen Xin'aoke Cable Co ltd
Original Assignee
SHENZHEN GREENNET COMMUNICATION TECHNOLOGIES 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 GREENNET COMMUNICATION TECHNOLOGIES Co Ltd filed Critical SHENZHEN GREENNET COMMUNICATION TECHNOLOGIES Co Ltd
Priority to CNB031468756A priority Critical patent/CN1304959C/en
Publication of CN1598789A publication Critical patent/CN1598789A/en
Application granted granted Critical
Publication of CN1304959C publication Critical patent/CN1304959C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a virtue flash memory technology. Concretely speaking, it is an approach of using disk files as flash memory to read and write data. Its steps are as follows: a) generating corresponding disk files according to needed memory capacity; b) mapping flash memory address to files and offset relative to head of file; c) memory address zone needed to access by application module is transformed as files and offset zone according to step b to read and write). d) encapsulate read and write operation in step c) as the same IO parameters of memory read and write function. In environment with disk device while no flash memory, software that needs read and write flash memory can be transparently transplanted and compatibly developed. The technology improves develop efficiency and data security and reduces time of transplanting.

Description

Method with the virtual flash reading and writing data of disk file
Technical field
The invention discloses a kind of virtual flash memory technology.
Background technology
In the realization of some electronic equipments (including but not limited to the network equipment, industrial computer equipment etc.), be used to store and the carrier of reading of data flash memory often, the flash memory using method of current industrywide standard is: 1) be divided into polylith according to a certain size, the every capacity that certain byte number is arranged, absolute or relative address (following unification is called the address) are adopted in visit during flash memory, and address and piece number are relevant.2) read operation: in the internal memory of specifying start address and identical capitalization, the read operation of true flash memory can be at random with the data read of an address section of flash memory; 3) write operation: the data of an address section of internal memory are write in the flash memory of specifying start address and identical size, if the address section of flash memory is to cross over different masses, just require to resolve into polylith, be respectively that unit is operated with the piece, will earlier this piece content all be read into one is based upon buffering in the internal memory (size of this buffering is the same with piece, be complete map), all wipe this piece content, according to this buffering of content update (may be part) that will write, will cushion again and all write this piece then; If relate to polylith, carry out aforesaid operations by piece successively; 4) erase operation: mainly being because the physical characteristics of flash memory will be wiped earlier before writing, can certainly be to do pure wiping for secret the needs.5) driving of general device software has all been done such encapsulation to flash disk operation: reading and writing, wipe.
Along with the development of technology, some equipment begin to adopt disk as storer, use the read-write operation of disk file system to visit data.
Because the data access of the software of these two kinds of equipment partly is incoherent, thereby, for the data visit, formed two kinds of different equipment platforms.
There is following shortcoming in above-mentioned prior art: 1) for the equipment platform of direct use flash memory, before write operation, must wipe corresponding flash block, and then write operation, speed is slow; 2) for the equipment platform of direct use disk file system, to distinguish according to filename or record during with some significant datas storages, more complicated in structure organization, for upper layer software (applications) not as direct visit absolute or relative address come conveniently; 3) in the time of on the application software module of direct read flash memory need being transplanted to the equipment platform that uses disk, need to rewrite the data access mode of upper layer software (applications), the application module that involves is a lot, needs redesign to realize relevant portion, and very big rewriting workload is arranged; 4) when new software of exploitation on the equipment platform that uses disk at or module, look ahead simultaneously if desired and can be transplanted on the equipment platform of direct use flash memory, whether so, wherein having the application module of reading and writing data to need to rewrite is a problem.
Summary of the invention
Purpose of the present invention is intended to overcome above-mentioned the deficiencies in the prior art, provides that a kind of data read-write operation that makes application software is can be on above-mentioned two kinds of different equipment platforms level and smooth pellucidly to be transplanted and the method for the virtual flash reading and writing data of usefulness disk file of compatible exploitation.
Realize the technical scheme of above-mentioned purpose: a kind of method with the virtual flash reading and writing data of disk file may further comprise the steps:
A, the configuration of flash capacity as required produce corresponding disk file;
B, set up the mapping relations of flash memory address, make the effective address of each flash memory can be mapped to the side-play amount of disk file and relative file head to the side-play amount of file and relative file head according to step a);
C, according to the flash memory address interval of application module needs visits, carry out read and write access according to step b) by the interval that mapping relations convert file and side-play amount to;
D, the read-write operation of step c) is packaged into the flash reading and writing function has the same input.
Adopt technique scheme, the technical progress that the present invention gives prominence to is: the application software module that 1) originally used direct flash disk operation does not need to revise the operation of its reading and writing data on being transplanted to the equipment platform that uses disk file system the time, can directly use.2) on the equipment platform that uses disk file system, if there is application module need be transplanted in the future on the equipment platform of direct flash disk operation, this application module can design according to virtual flash memory technology, and transplanting does not later on have problems.3) on the equipment platform that uses disk file system, even for not transplanting possible application module, use virtual flash memory technology to read and write data, the algorithm of visit can more convenient, safety.Because the specific address of the organizational form of data and storage all has been fixed up like this, even representing the true disk file of virtual flash memory also is to be fixed up from the beginning, and on file size and the disk space position (a plurality of sector) that occupies, can not change, what change is wherein content, for disk file, when change the size situation the time, may make a mistake.This succession for some modular designs in the network equipment is used, and is even more important.4) along with development of computer, disk is compared flash memory that speed is fast, capacity is big, cheap, removable, change characteristics such as convenient.5) by becoming different files, can find to cause the operation of crossing the border of read-write flash memory address easily, improve the measurability and the maintainability of software because of program error according to single or a plurality of maps; 6) can easily under disk file operating system,, back up flash data easily by file is duplicated.
The present invention is described in further detail below by embodiment:
Embodiment: a kind of method with the virtual flash reading and writing data of disk file may further comprise the steps
A, the configuration of flash capacity as required produce corresponding disk file.Can be the corresponding file (first kind) of a flash block, also can be a plurality of groupings, the corresponding file (second kind) of each group, the corresponding file (the third) of perhaps all pieces; For core algorithm, realize that according to second kind packet mode first kind is two special cases of second kind with the third, a group can have only one, or whole piece, perhaps part piece.
B, set up the mapping relations of flash memory address, make the effective address of each flash memory can be mapped to the side-play amount of disk file and relative file head to the side-play amount of file and relative file head according to step a).Side-play amount can be to be unit with the byte, and the perhaps minimum visit unit's byte number of regulation perhaps according to 2 or 4 or a plurality of byte-aligned etc., is decided according to the operating feature of actual flash memory.
C, according to the flash memory address interval of application module needs visits, carry out read and write access according to step b) by the interval that mapping relations convert the side-play amount of file and relative file head to.The operation of its response is: 1) read operation, if a plurality of different grouping of the interval leap of the flash memory address of appointment can be opened the corresponding image file of each grouping so successively and carry out read operation, data are read in successively the internal memory of appointment; 2) write operation: cross over a plurality of different grouping if the flash memory address of appointment is interval, can open the corresponding image file of each grouping so successively and carry out write operation, data are write file position between the corresponding file offset field successively.Because disk file system, can omit at this monoblock is duplicated out earlier, wipes, upgraded the method that writes again, there be not explicit wiping, but directly can write operation, thereby write operation speed is quick and easy.Certainly, maintain secrecy and add an erase operation if original true flash drive has by the function of piece obliterated data or is necessary for, can according to the application scenario set up and truly the flash memory erase operation have one of the same parameter to wipe function.
D, the read-write operation of step c) is packaged into the flash reading and writing function has the same input,, then can adopt heavily loaded mode if virtual flash disk operation function and actual flash disk operation function are of the same name; If not of the same name, can finish with simple unified replacement function name.Perhaps in the virtual flash disk operation function of described encapsulation, make the switch of a judgement, if use the equipment platform of disk then to select, if use the equipment platform of flash memory then to select to use true flash disk operation with the virtual flash disk operation of disk.
After finishing according to above-mentioned steps, on disk file system, utilize the read-write operation of disk is changed by certain mapping, be modeled to operation to flash memory, application module can be according to the mode visit data of direct visit flash memory, all the other related algorithm flow processs need not change, and whether make the algorithm that reads and writes data of upper application software exist on the equipment platform of true flash memory is the same.Original upper application software module of flash memory of using can smoothly be transplanted on the equipment platform that uses disk file system, perhaps just operates in seemingly by present technique on the platform that uses flash memory at the application module newly developed on the platform of disk file.
Virtual flash memory technology of the present invention has been realized on the network equipment of the AS8208 of Green Nai Te company and use disk file systems such as AS8826 and NATXP1000.The part of module that these products use is to transplant from other networking products of company to come, and application module originally uses the mode of direct flash disk operation to read and write data, used virtual flash memory technology after, the relevant portion of application module need not to change; And some functions of modules that newly realize on the equipment platform of virtual flash memory can be transplanted back again and use on the flash memory ground equipment platform easily.Thereby improved the development efficiency of company largely, saved cost of development.

Claims (6)

1, a kind of method with the virtual flash reading and writing data of disk file is characterized in that may further comprise the steps:
A, the configuration of flash capacity as required produce corresponding disk file;
B, set up the mapping relations of flash memory address, make the effective address of each flash memory can be mapped to the side-play amount of disk file and relative file head to the side-play amount of file and relative file head according to step a);
C, according to the flash memory address interval of application module needs visits, carry out read and write access according to step b) by the interval that mapping relations convert file and side-play amount to;
D, the read-write operation of step c) is packaged into the flash reading and writing function has the same input.
2, the method with the virtual flash reading and writing data of disk file as claimed in claim 1, it is characterized in that: step b) can be the corresponding file of a flash block, also can be a plurality of groupings, the corresponding file of each group can also be all corresponding files of piece.
3, the method with the virtual flash reading and writing data of disk file as claimed in claim 2, it is characterized in that: a group can have only one, or whole piece, or the part piece.
4, the method with disk file virtual flash reading and writing data as claimed in claim 1 is characterized in that: side-play amount can be to be unit with the byte, and the perhaps minimum visit unit's byte number of regulation is perhaps according to 2 or 4 or a plurality of byte-aligned.
5, as any described method of claim 1~4, it is characterized in that:, then can adopt heavily loaded mode if virtual flash disk operation function and actual flash disk operation function are of the same name with the virtual flash reading and writing data of disk file; If not of the same name, with simple unified replacement function name.
6, as any described method of claim 1~4 with the virtual flash reading and writing data of disk file, it is characterized in that: the switch of in the virtual flash disk operation function of described encapsulation, doing a judgement, if use the equipment platform of disk then to select, if use the equipment platform of flash memory then to select to use true flash disk operation with the virtual flash disk operation of disk.
CNB031468756A 2003-09-16 2003-09-16 Method of reading -writing data using disk file virtual flash Expired - Lifetime CN1304959C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB031468756A CN1304959C (en) 2003-09-16 2003-09-16 Method of reading -writing data using disk file virtual flash

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB031468756A CN1304959C (en) 2003-09-16 2003-09-16 Method of reading -writing data using disk file virtual flash

Publications (2)

Publication Number Publication Date
CN1598789A true CN1598789A (en) 2005-03-23
CN1304959C CN1304959C (en) 2007-03-14

Family

ID=34659701

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB031468756A Expired - Lifetime CN1304959C (en) 2003-09-16 2003-09-16 Method of reading -writing data using disk file virtual flash

Country Status (1)

Country Link
CN (1) CN1304959C (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736858A (en) * 2011-04-01 2012-10-17 柴可 Realization method for embedded virtual USB disk
CN103226505A (en) * 2013-04-22 2013-07-31 华为技术有限公司 Method and equipment for checking basic input output system (BIOS)
CN101676885B (en) * 2008-09-17 2013-08-21 群联电子股份有限公司 Data management method and storage device and controller thereof
CN110287128A (en) * 2019-05-21 2019-09-27 北京微密科技发展有限公司 CPU virtual DRAM controller fusing flash memory

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101825995B (en) * 2010-05-11 2011-08-03 太仓市同维电子有限公司 Method for supporting reading and writing of files on small flash memory partitions

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08328762A (en) * 1995-06-06 1996-12-13 Mitsubishi Electric Corp Semiconductor disk device and memory management method therefor
US6047352A (en) * 1996-10-29 2000-04-04 Micron Technology, Inc. Memory system, method and predecoding circuit operable in different modes for selectively accessing multiple blocks of memory cells for simultaneous writing or erasure
JPH10326227A (en) * 1997-05-23 1998-12-08 Nec Corp System for managing storage device using flash memory as storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101676885B (en) * 2008-09-17 2013-08-21 群联电子股份有限公司 Data management method and storage device and controller thereof
CN102736858A (en) * 2011-04-01 2012-10-17 柴可 Realization method for embedded virtual USB disk
CN103226505A (en) * 2013-04-22 2013-07-31 华为技术有限公司 Method and equipment for checking basic input output system (BIOS)
CN103226505B (en) * 2013-04-22 2016-08-03 华为技术有限公司 A kind of method and apparatus verifying basic input-output system BIOS
CN110287128A (en) * 2019-05-21 2019-09-27 北京微密科技发展有限公司 CPU virtual DRAM controller fusing flash memory
CN110287128B (en) * 2019-05-21 2021-06-04 北京融芯微科技有限公司 CPU virtual DRAM controller fusing flash memory

Also Published As

Publication number Publication date
CN1304959C (en) 2007-03-14

Similar Documents

Publication Publication Date Title
CN102508784B (en) Data storage method of flash memory card in video monitoring equipment, and system thereof
CN102667740B (en) Boundary alignment by data storage device subregion Yu physical data sector
JP4155463B2 (en) System having flash management system using only sequential writing and method thereof
CN104011642B (en) By the method and apparatus of erasure codes data distribution to magnetic disk storage
CN104903872B (en) System, method and interface for adaptive persistence
CN1223945C (en) Improved flash file system
JP3347015B2 (en) Adaptive localization method and apparatus for frequently accessed and randomly addressed data
KR20020080458A (en) A method for repartitioning physical sectors of a storage system with use of virtual disc drives, a data processing apparatus and a data storage apparatus
US20120151125A1 (en) Data processing method for nonvolatile memory system
KR20110056276A (en) A portable storage device with an accelerated access speed
CN107479922A (en) A kind of flash data management method, device and computer-readable recording medium
CN107239526A (en) File system implementation method, scrap cleaning method, operating position localization method
CN106528443B (en) FLASH management system and method suitable for spaceborne data management
CN108334277B (en) A kind of log write-in and synchronous method, device, system, computer storage medium
CN103049224A (en) Method, device and system for importing data into physical tape
JPH05224822A (en) Collective storage device
CN101315674B (en) Method for protecting and reading issued data of memory card
CN102169419A (en) RAID (redundant array of independent disks) data block splitting and assembling method based on SATA (serial advanced technology attachment) controller
CN1304959C (en) Method of reading -writing data using disk file virtual flash
CN104615383A (en) Software operation method and device based on virtual disk
CN107632779A (en) Data processing method and device, server
CN1542624A (en) Method for quickening logic block mapping speed in Flash file system
CN109656834A (en) It is related to the data managing method and data storage system of NameSpace planning
CN1889189A (en) Partition-supporting flash storing memory device
CN102314396B (en) Method and device for accessing bytes by taking a block as base flash

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: SHENZHEN CITY NEW GREEN KNIGHT ICT CO., LTD.

Free format text: FORMER OWNER: SHENZHEN GELIN NAITONG COMMUNICATION TECHNOLOGY CO., LTD.

Effective date: 20071109

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20071109

Address after: 518057, second, fourth floor, No. 10, Qiong Yu Road, Nanshan District Science Park, Shenzhen, Guangdong

Patentee after: SHENZHEN NEW GREENNET TECHNOLOGIES Co.,Ltd.

Address before: 518057 No. 10, Qiong Yu Road, Shenzhen science and Technology Park, Guangdong, China

Patentee before: SHENZHEN GELINNAITE COMM TECHN

C57 Notification of unclear or unknown address
DD01 Delivery of document by public notice

Addressee: Dai Chang

Document name: Notification to Pay the Fees

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200108

Address after: Shenzhen Nanshan District City, Guangdong province 518000 North Ring Road North Song Ping Road No. 2 Sumitomo fiber cable plant on the eastern side of two yuan

Co-patentee after: SHENZHEN XIN'AOKE CABLE Co.,Ltd.

Patentee after: SHENZHEN NEW GREENNET TECHNOLOGIES Co.,Ltd.

Address before: 518057 second and fourth floors, No.10 Qiongyu Road, Science Park, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN NEW GREENNET TECHNOLOGIES Co.,Ltd.

CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20070314