CN1405683A - FLASH storage file management method - Google Patents
FLASH storage file management method Download PDFInfo
- Publication number
- CN1405683A CN1405683A CN 01142240 CN01142240A CN1405683A CN 1405683 A CN1405683 A CN 1405683A CN 01142240 CN01142240 CN 01142240 CN 01142240 A CN01142240 A CN 01142240A CN 1405683 A CN1405683 A CN 1405683A
- Authority
- CN
- China
- Prior art keywords
- file
- piece
- steps
- management method
- assignment information
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The FLASH memory is divided into the file data storage area and the file index area. The file data storage area composed of the 'block' of FLASH memory is utilized to store the content of the file. The file index area is utilized to record the file directories and the allocation information of 'block' of FLASH memory. Based on the said partition, the operations of writing file, reading file and erasing file are carried out, making the FLASH space be allocated based on the dynamic quantity and the length of the file utilized. Thus, it is not needed to modify the code or upgrade the software when the quantity of the file is adjusted or the length of the file is changed. The invention uses the resources reasonably and saves the storage space.
Description
Technical field
The present invention relates to storage management method, relate in particular to a kind of FLASH (flash Electrically Erasable Read Only Memory) storage file management method.
Background technology
A FLASH chip storage capacity is fixed, for storing different data files, existing technology is generally taked following management method, fixedly be divided into several storage areas according to FLASH capacity, number of files and big young pathbreaker FLASH earlier, for example, want 5 different files of storage size, just earlier FLASH is divided into five zones that differ in size, again to the start address of each file correspondence record in addition respectively.Data such as each above field capacity size and start address are all with in the constant form write-in program code, when operation such as need carry out reading and writing to certain file, wipe, find the start address and the area size of its correspondence earlier, operation such as carry out the data reading and writing to this address then, wipe.Simple, the realization easily of this scheme, the FLASH management of existing product all is to adopt said method basically.
And this method has the following disadvantages: (1) programmer must know the number of files that will store in advance before writing FLASH management software code, with decision FLASH is divided into several zones, be unfavorable for that product stores the indefinite file of number in application, if the number of files of storage is more than the subregion number, just must remodify code, upgrade software.(2) size of programmer's each file that estimation in advance will be stored before writing FLASH management software code, with the decision is that this document distributes great FLASH zone, if the file size of storage is bigger than the zone of reserving, then this document can't correctly be stored, and also disturb the file storage of close region.(3) because the file size of pre-estimating is inaccurate, or meet file modification, very likely give an original very little bigger storage area of file allocation, cause the waste of storage space.
Summary of the invention
The object of the present invention is to provide a kind of FLASH storage file management method that distributes rationally, uses flexibly and save storage space.
For achieving the above object, the technical solution used in the present invention is: at first, the FLASH storage space is divided into file index district and two zones of file data storage region, the file index district is used for the assignment information of log file catalogue and basic allocation unit " piece ", and file data storage region is used for the particular content of storage file;
The operation that file writes may further comprise the steps:
A1, search for first sky piece as starting block;
A2, with in the file data write-in block;
Whether A3, inspection file have all been write, if finish write operation; If not, execution in step A4;
A4, the next empty piece of search, and in the assignment information of " piece " the link order of record " piece ", steps A 2 is changeed in the back;
The operation that file is read may further comprise the steps:
B1, from file directory, obtain starting block;
B2, read file data;
B3, from the assignment information of " piece ", find next piece;
If last piece of B4 no show file, repeated execution of steps B2 to B4;
The operation that file is wiped may further comprise the steps:
C1, from file directory, obtain starting block;
C2, wipe file data;
C3, from the assignment information of " piece ", find next piece;
If last piece of C4 no show file, repeated execution of steps C2 to C4.
Owing to adopt above technical scheme, make the FLASH space in use according to quantity of documents and length dynamic assignment, change static allocation in the prior art, fixed the deficiency of using and bringing, more reasonable to the utilization of resource; Need not to revise code, upgrade software when adjusting number of files or changing file size, flexible and convenient to use and saving storage space.
Description of drawings
Fig. 1 is FLASH partitioned organization figure among the present invention program;
Fig. 2 is a kind of embodiment synoptic diagram of FLASH index area among the present invention program;
Fig. 3 is a kind of embodiment process flow diagram that file writes FLASH among the present invention program;
Fig. 4 is a kind of embodiment process flow diagram of reading file among the present invention program from FLASH
Fig. 5 is a kind of embodiment process flow diagram of wiping file among the present invention program from FLASH
Embodiment
With reference to Fig. 1, FLASH storage file management method of the present invention at first is divided into FLASH two zones, one of them zone file data storage region that is used for the storage file particular content for being made up of basic allocation unit " piece "; Another zone is the file index district that is used for the assignment information of log file catalogue and basic allocation unit " piece ".Common FLASH chip physically is divided into tens of unit length and arrives hundreds of " piece ", is divided into 128 as every of INTEL 28F128 FLAH chip, and every 128K byte can be with these " pieces " as basic allocation unit when specifically dividing.According to such division, the file index district only accounts for 1 to 2 " piece " just can satisfy the storage needs, and all the other pieces are all to file data storage region.
With reference to Fig. 2, the file index district can be further divided into two sections of branches, i.e. file directory section 1 and " piece " table section 2.The catalogue of existing file among the file directory section 1 record FLASH, but every file catalogue include file name, starting block number, file size and file status information can also comprise other attributes such as FileVersion, author, time.The information that the assignment information of " piece " table section 2 records " piece " and each file are shared.
The FLASH storage space is carried out after the above-mentioned division, can writing, reading and erase operation by the inventive method execute file.
Figure 3 shows that file writes a kind of embodiment of FLASH, program checks for this document whether enough storage spaces are arranged earlier, if having, continues steps A 1; If do not have, finish after then returning the not enough information in space.Steps A 1 is that first sky piece of search is as starting block; Check subsequently whether file directory successfully writes file directory section 1, if then the seizure condition of current block is changed to and takies, and continue steps A 2; If not, finish after returning corresponding information; Steps A 2 is with in the file data write-in block, and after this, the program checkout file data writes whether success, if not, finishes after returning corresponding information; If execution in step A3 checks whether file has all been write, if finish write operation; If not, execution in step A4; Steps A 4 is searched for next empty piece, and writes down the link order of " piece " in the assignment information of " piece ", and steps A 2 is changeed in the back; The assignment information of " piece " shown in Fig. 2 comprises this piece piece number, seizure condition, next piece piece number, promptly this piece piece of occupied each piece number and next piece piece number is noted down by the link order of this embodiment steps A 4 described records " piece ".In embodiment shown in Figure 3, " piece " user mode information comprises seizure condition and the chain list index that is used in reference to next piece, and the link of steps A 4 described records " piece " is to write its chained list pointer position of last with occupied number in proper order.When finishing write operation, present embodiment in chained list, writes end-of-file marker, replacement file status.
Figure 4 shows that a kind of embodiment of reading file from FLASH, at first execution in step B1 obtains starting block from file directory; Execution in step B2 reads file data again, checks subsequently and reads whether success of file data blocks, if not, finishes after returning corresponding information; If, continue step B3, from the assignment information of " piece ", find next piece; Execution in step B4 again, it is last whether inspection arrives file, can be to check whether the chain list index points to tail tag will in concrete the enforcement, if, the operation that file is read in end if not, is back to step B2, the effect of step B4 is if last piece of no show file, repeated execution of steps B2 to B4.
Figure 5 shows that a kind of embodiment of wiping file from FLASH, at first execution in step C1 obtains starting block from file directory; Execution in step C2 wipes file data again, checks subsequently and wipes whether success of file data blocks, if not, finishes after returning corresponding information; If, the piece seizure condition is changed to data wipes, continue step C3 again, from the assignment information of " piece ", find next piece; Execution in step C4 again, it is last whether inspection arrives file, can be to check whether the chain list index points to tail tag will in concrete the enforcement, if, the operation that file is wiped in end if not, is back to step C2, the effect of step C4 is if last piece of no show file, repeated execution of steps C2 to C4.When present embodiment finished erase operation, putting file status was that data are wiped.
The length of basic allocation unit described in the inventive method " piece " also can make space availability ratio improve according to the operating position explication by User Defined.
Claims (5)
1, a kind of FLASH storage file management method, it is characterized in that: the FLASH storage space is divided into file index district and two zones of file data storage region, the file index district is used for the assignment information of log file catalogue and basic allocation unit " piece ", and file data storage region is used for the particular content of storage file;
The operation that file writes may further comprise the steps:
A1, search for first sky piece as starting block;
A2, with in the file data write-in block;
Whether A3, inspection file have all been write, if finish write operation; If not, execution in step A4;
A4, the next empty piece of search, and in the assignment information of " piece " the link order of record " piece ", steps A 2 is changeed in the back;
The operation that file is read may further comprise the steps:
B1, from file directory, obtain starting block;
B2, read file data;
B3, from the assignment information of " piece ", find next piece;
If last piece of B4 no show file, repeated execution of steps B2 to B4;
The operation that file is wiped may further comprise the steps:
C1, from file directory, obtain starting block;
C2, wipe file data;
C3, from the assignment information of " piece ", find next piece;
If last piece of C4 no show file, repeated execution of steps C2 to C4.
2, FLASH storage file management method as claimed in claim 1 is characterized in that: described file directory comprises filename, storage starting block number, file size, file status.
3, FLASH storage file management method as claimed in claim 1 is characterized in that: the assignment information of described " piece " comprises this piece piece number, seizure condition, next piece piece number; The link of steps A 4 described records " piece " order promptly number is noted down to this piece piece of occupied each piece number and next piece piece.
4, FLASH storage file management method as claimed in claim 1 is characterized in that: the assignment information of described " piece " comprises seizure condition and the chain list index that is used in reference to next piece; The link of steps A 4 described records " piece " is to write its chained list pointer position of last with occupied number in proper order.
5, FLASH storage file management method as claimed in claim 1 is characterized in that: the length of described basic allocation unit " piece " is by User Defined.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 01142240 CN1204501C (en) | 2001-09-18 | 2001-09-18 | FLASH storage file management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 01142240 CN1204501C (en) | 2001-09-18 | 2001-09-18 | FLASH storage file management method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1405683A true CN1405683A (en) | 2003-03-26 |
CN1204501C CN1204501C (en) | 2005-06-01 |
Family
ID=4676714
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 01142240 Expired - Fee Related CN1204501C (en) | 2001-09-18 | 2001-09-18 | FLASH storage file management method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1204501C (en) |
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100336392C (en) * | 2003-12-03 | 2007-09-05 | 北京中视联数字系统有限公司 | Data storage managing method of set-top box |
CN100431051C (en) * | 2005-08-12 | 2008-11-05 | 中兴通讯股份有限公司 | Method for configuring parameter in NOR FLASH |
CN100557611C (en) * | 2007-11-15 | 2009-11-04 | 深圳华为通信技术有限公司 | A kind of disposal route of file and device |
WO2010006514A1 (en) * | 2008-07-17 | 2010-01-21 | 成都市华为赛门铁克科技有限公司 | Method and device of virtualizing file |
CN101221581B (en) * | 2008-01-24 | 2010-06-02 | 北京中星微电子有限公司 | Data file generation method and device |
CN102004700A (en) * | 2010-11-26 | 2011-04-06 | 华为终端有限公司 | Memory space distribution method and device for flash memory |
US7984249B2 (en) | 2006-10-02 | 2011-07-19 | Samsung Electronics Co., Ltd. | Method for writing a file by different writing schemes according to file characteristics and electronic device using the method |
WO2011116612A1 (en) * | 2010-03-23 | 2011-09-29 | 中兴通讯股份有限公司 | Level-to-level management method and system of storage resources |
CN102279805A (en) * | 2011-09-06 | 2011-12-14 | 四川九洲电器集团有限责任公司 | Memory data storing and reading method |
CN104077167A (en) * | 2014-07-11 | 2014-10-01 | 杭州华三通信技术有限公司 | Boot loading method and device based on NAND FLASH |
CN104376099A (en) * | 2014-11-25 | 2015-02-25 | 贵州电力试验研究院 | Flash-memory-based file system implementation method and device |
CN104462280A (en) * | 2014-11-27 | 2015-03-25 | 国网上海市电力公司 | Data information storage and fast inquiry method used for embedded system |
CN104572723A (en) * | 2013-10-21 | 2015-04-29 | 华为技术有限公司 | File access method and file access device |
CN105718530A (en) * | 2016-01-15 | 2016-06-29 | 上海磁宇信息科技有限公司 | File storage system and file storage control method thereof |
CN106440256A (en) * | 2016-11-11 | 2017-02-22 | 四川长虹电子部品有限公司 | Remote controller for air conditioner and data storage method of remote controller |
CN106959823A (en) * | 2017-03-13 | 2017-07-18 | 许继集团有限公司 | It is a kind of to improve the implementation method that FLASH parameter preserves number of times |
CN108255433A (en) * | 2018-01-12 | 2018-07-06 | 纳思达股份有限公司 | The file management method and device of flash storage, flash storage |
CN108376121A (en) * | 2018-03-01 | 2018-08-07 | 曲阜师范大学 | A kind of data store organisation of flash storage |
CN108415852A (en) * | 2018-03-01 | 2018-08-17 | 曲阜师范大学 | A kind of data access method of flash storage |
CN108629927A (en) * | 2017-03-23 | 2018-10-09 | 惠尔丰(中国)信息系统有限公司 | A kind of optimization method of the memory of low dump machine |
CN108664482A (en) * | 2017-03-27 | 2018-10-16 | 纳思达股份有限公司 | FLASH memory and storage file management method |
CN108710578A (en) * | 2018-04-20 | 2018-10-26 | 深圳市战音科技有限公司 | Date storage method based on flash memory and device |
CN109002399A (en) * | 2018-07-09 | 2018-12-14 | 北京智芯微电子科技有限公司 | The method of embedded device logout |
CN113934371A (en) * | 2021-10-08 | 2022-01-14 | 福建星网视易信息系统有限公司 | Memory, data management method thereof and computer storage medium |
-
2001
- 2001-09-18 CN CN 01142240 patent/CN1204501C/en not_active Expired - Fee Related
Cited By (32)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100336392C (en) * | 2003-12-03 | 2007-09-05 | 北京中视联数字系统有限公司 | Data storage managing method of set-top box |
CN100431051C (en) * | 2005-08-12 | 2008-11-05 | 中兴通讯股份有限公司 | Method for configuring parameter in NOR FLASH |
CN101158922B (en) * | 2006-10-02 | 2011-08-10 | 三星电子株式会社 | Method for writing a file by different writing schemes according to file characteristics and electronic device using the method |
US7984249B2 (en) | 2006-10-02 | 2011-07-19 | Samsung Electronics Co., Ltd. | Method for writing a file by different writing schemes according to file characteristics and electronic device using the method |
CN100557611C (en) * | 2007-11-15 | 2009-11-04 | 深圳华为通信技术有限公司 | A kind of disposal route of file and device |
CN101221581B (en) * | 2008-01-24 | 2010-06-02 | 北京中星微电子有限公司 | Data file generation method and device |
WO2010006514A1 (en) * | 2008-07-17 | 2010-01-21 | 成都市华为赛门铁克科技有限公司 | Method and device of virtualizing file |
WO2011116612A1 (en) * | 2010-03-23 | 2011-09-29 | 中兴通讯股份有限公司 | Level-to-level management method and system of storage resources |
US9047174B2 (en) | 2010-03-23 | 2015-06-02 | Zte Corporation | Method and system for hierarchically managing storage resources |
CN102004700A (en) * | 2010-11-26 | 2011-04-06 | 华为终端有限公司 | Memory space distribution method and device for flash memory |
CN102279805A (en) * | 2011-09-06 | 2011-12-14 | 四川九洲电器集团有限责任公司 | Memory data storing and reading method |
CN104572723A (en) * | 2013-10-21 | 2015-04-29 | 华为技术有限公司 | File access method and file access device |
WO2015058628A1 (en) * | 2013-10-21 | 2015-04-30 | 华为技术有限公司 | File access method and device |
CN104077167A (en) * | 2014-07-11 | 2014-10-01 | 杭州华三通信技术有限公司 | Boot loading method and device based on NAND FLASH |
CN104376099A (en) * | 2014-11-25 | 2015-02-25 | 贵州电力试验研究院 | Flash-memory-based file system implementation method and device |
CN104462280A (en) * | 2014-11-27 | 2015-03-25 | 国网上海市电力公司 | Data information storage and fast inquiry method used for embedded system |
CN105718530A (en) * | 2016-01-15 | 2016-06-29 | 上海磁宇信息科技有限公司 | File storage system and file storage control method thereof |
CN106440256A (en) * | 2016-11-11 | 2017-02-22 | 四川长虹电子部品有限公司 | Remote controller for air conditioner and data storage method of remote controller |
CN106959823A (en) * | 2017-03-13 | 2017-07-18 | 许继集团有限公司 | It is a kind of to improve the implementation method that FLASH parameter preserves number of times |
CN106959823B (en) * | 2017-03-13 | 2020-04-17 | 许继集团有限公司 | Implementation method for increasing FLASH parameter storage times |
CN108629927A (en) * | 2017-03-23 | 2018-10-09 | 惠尔丰(中国)信息系统有限公司 | A kind of optimization method of the memory of low dump machine |
CN108664482A (en) * | 2017-03-27 | 2018-10-16 | 纳思达股份有限公司 | FLASH memory and storage file management method |
CN108255433A (en) * | 2018-01-12 | 2018-07-06 | 纳思达股份有限公司 | The file management method and device of flash storage, flash storage |
CN108255433B (en) * | 2018-01-12 | 2021-12-07 | 珠海极海半导体有限公司 | Flash memory, file management method and device of Flash memory |
CN108415852A (en) * | 2018-03-01 | 2018-08-17 | 曲阜师范大学 | A kind of data access method of flash storage |
CN108376121A (en) * | 2018-03-01 | 2018-08-07 | 曲阜师范大学 | A kind of data store organisation of flash storage |
CN108376121B (en) * | 2018-03-01 | 2021-10-22 | 曲阜师范大学 | Data storage method of Flash memory |
CN108710578A (en) * | 2018-04-20 | 2018-10-26 | 深圳市战音科技有限公司 | Date storage method based on flash memory and device |
CN109002399A (en) * | 2018-07-09 | 2018-12-14 | 北京智芯微电子科技有限公司 | The method of embedded device logout |
CN109002399B (en) * | 2018-07-09 | 2021-05-18 | 北京智芯微电子科技有限公司 | Method for recording embedded equipment event |
CN113934371A (en) * | 2021-10-08 | 2022-01-14 | 福建星网视易信息系统有限公司 | Memory, data management method thereof and computer storage medium |
CN113934371B (en) * | 2021-10-08 | 2024-04-12 | 福建星网视易信息系统有限公司 | Memory, data management method thereof and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN1204501C (en) | 2005-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1204501C (en) | FLASH storage file management method | |
US7610434B2 (en) | File recording apparatus | |
JP4175568B2 (en) | Persistent and robust storage allocation system and method | |
CN101027651B (en) | FAT analysis for optimized sequential cluster management | |
US6587915B1 (en) | Flash memory having data blocks, spare blocks, a map block and a header block and a method for controlling the same | |
JP3771803B2 (en) | System and method for persistent and robust memory management | |
KR101369996B1 (en) | Method and system for dual mode access for storage devices | |
CN1078364C (en) | Flash file system | |
US7769978B2 (en) | Method and system for accessing non-volatile storage devices | |
CN101147119B (en) | Direct data file storage implementation techniques in flash memories | |
CN1223945C (en) | Improved flash file system | |
CN101263462B (en) | Nonvolatile memory with block management | |
US7401174B2 (en) | File system defragmentation and data processing method and apparatus for an information recording medium | |
KR101157171B1 (en) | A storage system for a smart card and a method of managing file creation in the storage system | |
KR100769402B1 (en) | Memory card | |
CN101606133A (en) | Use with immediate data file system of continuous logical address space interface | |
JPH07191892A (en) | Method and system for management of file system by using flash-reasable programmable read-only memory | |
CN101408880A (en) | Methods and apparatus for file management using partitioned file metadata | |
CN107239526A (en) | File system implementation method, scrap cleaning method, operating position localization method | |
WO2010035124A1 (en) | File system for storage device which uses different cluster sizes | |
CN102169460A (en) | Method and device for managing variable length data | |
CN101051317A (en) | FAT file system and its processing method | |
CN111522507A (en) | Low-delay file system address space management method, system and medium | |
CN1351350A (en) | Method for partitioning memory block and identifying R/W information in flash memory | |
KR100907477B1 (en) | Apparatus and method for managing index of data stored in flash memory |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20050601 Termination date: 20130918 |