CN100449549C - Method for building file systems on NAND flash memory in embedded system - Google Patents

Method for building file systems on NAND flash memory in embedded system Download PDF

Info

Publication number
CN100449549C
CN100449549C CNB2007101562078A CN200710156207A CN100449549C CN 100449549 C CN100449549 C CN 100449549C CN B2007101562078 A CNB2007101562078 A CN B2007101562078A CN 200710156207 A CN200710156207 A CN 200710156207A CN 100449549 C CN100449549 C CN 100449549C
Authority
CN
China
Prior art keywords
file
allocation table
document
list
file system
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.)
Expired - Fee Related
Application number
CNB2007101562078A
Other languages
Chinese (zh)
Other versions
CN101140586A (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CNB2007101562078A priority Critical patent/CN100449549C/en
Publication of CN101140586A publication Critical patent/CN101140586A/en
Application granted granted Critical
Publication of CN100449549C publication Critical patent/CN100449549C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)

Abstract

The invention discloses a method to establish a file system in NAND Flash storage in an embedded system. The invention is a single-leveled directory file system that utilizes a page interlinking page to manage storage space; a file registration list and a file allocation table of the system are stored in a float address mode; variation of FRT and FAT in the RAM memory will be written into a Flash storage in a real-time on-line increment mode for an increment file registration list and an increment file allocation table; in the single-leveled directory file system, relevant information of the file registration list and the file allocation table is simultaneously written into redundancy bits in relevant block pages in the Flash data area, so as to provide backup for the single-leveled directory file system. The invention improves FRT and FAT with fixed storage addresses into movable storage addresses, in order to establish a wearing balancing mechanism; in Delta FRT and Delta FAT of a Flash storage, the invention can fulfill real-time record for FRT and FAT variations in RAM memory, so as to provide a file system failure recovery mechanism; besides, the invention utilizes redundancy bits of each page in a Flash storage to write relevant information for the file system, in order to establish a redundancy backup mechanism.

Description

Set up the method for file system in the embedded system on the NAND Flash storer
Technical field
The present invention relates to the technical field of Flash storer, be specifically related to set up on the NAND Flash storer in the embedded system method of file system.
Background technology
Embedded system is used erasable non-volatile Flash memory stores code and data.File system has shielded the ins and outs of physical storage, institute's information of managing is organized into document form, thereby increased the portable and maintainable of program, be convenient to the user and effectively manage lot of data, had common and practical so set up file system on the Flash storer.On multi-purpose computer, have many ripe file system at present, as the FAT file system under the Dos, new technology file system under the Windows NT and Unix, Linux file system, but above-mentioned file system is not suitable for being directly used in embedded system, subject matter has: at first the applied environment of embedded system is abominable more than computing machine, and universal document system is considered not enough for Design in Reliability; Secondly universal document system is based on resourceful computer platform and disc driver at a slow speed, and often use expends the technology such as buffer memory of ample resources, this with embedded system in the situation of resource-constrained different fully; Thirdly be derived from the inherent characteristic of NAND Flash, NAND Flash storer is formed by some, and piece is formed by some pages, and page or leaf then comprises some bytes of memory unit and some redundancy bytes.The read operation of Flash storer is consistent with disk, but write operation is different with disk, and universal document system does not have corresponding specialized designs to this.The shared storage space base unit of Flash memory file is a piece, data write operation must or be wiped in the block of back and carry out at blank block, wiping requirement is that unit carries out (it is fast that OXFF is write storer to be wiped) with piece Block, write operation carries out (once must write a Page) by page or leaf Page mode, the erasing times of Flash storer is limited (100000 times), must consider the inherent characteristic of Flash storer when setting up file system on the Flash storer, avoid some piece over-erasure to cause the wear out failure of storage medium.
At present, the file system on the high capacity Flash storer has three kinds of JFFS2, YAFFS and TyueFFs, and these three kinds need take more resource based on log-structured file system.DOS FAT file system is with a long history, technology maturation, reliable in structure, system resource overhead are little, is easy to realize on the Flash storer of middle-size and small-size, low and middle-end embedded system.Characteristics at the embedded system working environment, inherent characteristic based on the Flash storer, the present invention improves accordingly to DOS FAT file system, the file system of NAND Flash storer in a kind of embedded system is proposed, except data management function is provided, pay attention to improving the reliability of file system, and prolong storage life by the abrasion equilibrium mechanism of FRT, FAT table memory block.
Summary of the invention
The purpose of this invention is to provide the method for setting up file system in a kind of embedded system on the NAND Flash storer.
It is the single level directory file system that adopts url page management by methods storage space, the list of document of single level directory file system, file allocation table are used the floating address method storage, list of document in the memory ram and file allocation table change, and real-time online writes Flash storer delta file registration form and delta file allocation table with incremental form; The relevant information of list of document and file allocation table writes in the redundancy bytes of the relevant Flash block page, as the backup of single level directory file system simultaneously in the single level directory file system.
Described single level directory file system is made up of floating address pointer gauge, list of document, delta file registration form, file allocation table, delta file allocation table and data field that system information and boot district, sensing FRT show; List of document, delta file registration form, file allocation table, delta file allocation table are with movably data mode storage, by the floating address pointer gauge addressing of system information and boot district and sensing list of document; When list of document, delta file registration form, file allocation table, the change of delta file allocation table memory address, new address is write the floating address pointer gauge that points to list of document, according to list of document, delta file registration form, file allocation table, delta file allocation table four table erasing times, move above-mentioned four tables to new Flash storage block, discharge the four former storage blocks of showing as DSB data store block, and no longer bear four table storage block functions.
Described single level directory file system copies to when moving the RAM from Flash, not only revise list of document and file allocation table in the memory ram, content be will revise simultaneously and delta file registration form and delta file allocation table in the Flash storer write with incremental form, recover list of document and file allocation table in the Flash storer with this increment information during fault, when list of document and file allocation table are upgraded, follow to write earlier and afterwards wipe principle.
Described single level directory file system is utilized the byte of each page redundancy of Flash storer, write reference number of a document, filename, generation or the last modification time of file system, a last block address of this document, the relevant information of next block address, as the redundancy backup of Flash memory file system list of document and file allocation table.
The present invention compares with background technology, and the beneficial effect that has is:
DOS FAT file system is with a long history, technology maturation, simple in structure, system resource overhead is little, improved DOS FAT file system migrates on the Flash storer, more existing JFFS2, YAFFS and TYUEFFS file system have tangible economic technology advantage, and its economic technology advantage is particularly evident in middle-size and small-size, low and middle-end embedded system.The FRT and the FAT of fixed storage address are modified into movably memory address, for the Flash storer has been set up a kind of abrasion equilibrium mechanism, solved traditional F RT and FAT fixed storage address, frequently erasable because of this memory block causes the difficult problem of the too early wear out failure of storer.In the delta file registration form Δ FRT and delta file allocation table Δ FAT of Flash storer, the FRT of real time record memory ram and FAT change, and the recovery mechanism of file system is provided; Utilize the byte of each page redundancy of Flash storer, write the relevant information of file system,, further improved the reliability of file system as the redundancy backup of Flash memory file registration form FRT and file allocation table FAT.
Description of drawings
Fig. 1 is a single level directory file system structure synoptic diagram of the present invention;
Fig. 2 is a list of document of the present invention, file allocation table mobile storage synoptic diagram (omitting delta file registration form, delta file allocation table among the figure);
Fig. 3 is a K9F6408UOM Flash memory construction synoptic diagram;
Fig. 4 is single level directory file system operation logic figure of the present invention.
Embodiment
As shown in Figure 1, the method of setting up file system in the embedded system on the NAND Flash storer is to adopt the single level directory file system of url page management by methods storage space, the list of document FRT 3 of single level directory file system, file allocation table FAT 5 use the floating address method storage, list of document FRT 3 in the memory ram and file allocation table FAT 5 change, and real-time online writes Flash storer delta file registration form Δ FRT 4 and delta file allocation table Δ FAT 6 with incremental form; The relevant information of list of document FRT 3 and file allocation table FAT 5 writes in the redundancy bytes of the relevant Flash block page, as the backup of single level directory file system simultaneously in the single level directory file system.
The single level directory file system is made up of system information and boot district, floating address pointer gauge PFRT, list of document FRT (1-N), delta file registration form Δ FRT (1-N), file allocation table FAT (1-N), delta file allocation table Δ FAT (1-N) and data field seven parts of pointing to FRT.System information and boot occupy Flash first block, important informations such as record storage type, capacity, structure (as comprise how many pieces, every comprise how many pages or leaves, every page memory capacity and redundancy capacity) version number; Boot is loaded into memory ram as required with FRT, FAT; Flash first block writes the first address of floating address pointer gauge PFRT, and floating address pointer gauge PFRT writes the first address of FRT and Δ FRT one by one.FRT deposits the storage chains of short title, filename, file size, file attribute and this document of each file at inlet of FAT etc.FAT deposits the storage organization with idle condition and each file of taking of all blocks on the Flash storer.The data field is used for store data.
As shown in Figure 2, described single level directory file system is made up of system information and boot district 1, floating address pointer gauge PFRT 2, list of document FRT 3, delta file registration form Δ FRT 4, file allocation table FAT 5, delta file allocation table Δ FAT 6 and the data field 7 of pointing to list of document FRT 3; List of document FRT 3, delta file registration form Δ FRT 4, file allocation table FAT 5, delta file allocation table Δ FAT 6 are with movably data mode storage, by floating address pointer gauge PFRT 2 addressing of system information and boot district 1 and sensing list of document FRT 3; When list of document FRT 3, delta file registration form Δ FRT 4, file allocation table FAT 5, the change of delta file allocation table Δ FAT 6 memory addresss, new address is write the floating address pointer gauge PFRT 2 that points to list of document FRT 3, according to list of document FRT 3, delta file registration form Δ FRT 4, file allocation table FAT 5, delta file allocation table Δ FAT 6 four table erasing times, move above-mentioned four tables to new Flash storage block, discharge the four former storage blocks of showing as DSB data store block, and no longer bear four table storage block functions.
In file system when operation, need the content of revised file registration form FRT (1-N) and file allocation table FAT (1-N) constantly, if FRT, FAT are fixed on the Flash storage block, this storage block certainly will too early wear out failure, and causes the collapse of file system.Therefore, when the erasing times of two table place storage blocks reach a certain threshold values, FRT and FAT are copied to free memory blocks, carry out data check simultaneously; After the verification succeeds, in the first location of the file pointer page or leaf that floating address pointer gauge PFRT reserves, write new FRT and Δ FRT first address.
As shown in Figure 3, K9F6408UOM is a NAND Flash memory chip that Samsung releases.Chip has 1024, and every is divided into 16 pages, and every page of 528 bytes, wherein 16 byte redundancies, so capacity are the byte of 1024*16* (512+16) byte=(8M+256K).In 16 bytes of each page redundancy of data area stores piece, write reference number of a document, filename, information such as the address of a piece, next block address on generation or last modification time, this document are as the redundancy backup of FRT and FAT.In case when the FRT of Flash storer and FAT broke down, scanning was dispersed in the FRT and the FAT redundant information recovery file system of data field.
As shown in Figure 4, described single level directory file system copies to when moving the RAM from Flash, not only revise list of document FRT 3 and file allocation table FAT 5 in the memory ram, content be will revise simultaneously and delta file registration form Δ FRT4 and delta file allocation table Δ FAT 6 in the Flash storer write with incremental form, recover list of document FRT 3 and file allocation table FAT 5 in the Flash storer with this increment information during fault, when list of document FRT 3 and file allocation table FAT 5 upgrade, follow to write earlier and afterwards wipe principle.Described single level directory file system is utilized the byte of each page redundancy of Flash storer, write reference number of a document, filename, generation or the last modification time of file system, a last block address of this document, the relevant information of next block address, as the redundancy backup of Flash memory file system list of document FRT 3 and file allocation table FAT 5.
Boot is loaded on file system the memory ram of embedded system.During operation for embedded system, FRT in the memory ram and FAT revise content and write Flash storer Δ FRT and Δ FAT blank page in real time.During unexpected the generation, according to the increment information recovery FRT and the FAT of Flash storer.During the system normal termination, FRT in the memory ram and FAT table are write FRT and the FAT table scratch block that file system keeps, after the verification succeeds, wipe the FRT and the FAT scratch list of file system, the FRT and the FAT of copy two table scratch block, and record FRT and FAT table memory block erasing times, wipe scratch block at last again; Again FRT and FAT information are write in the redundancy bytes of each page of data area stores piece at last.

Claims (4)

1. set up the method for file system in the embedded system on the NAND Flash storer, it is characterized in that it is the single level directory file system that adopts url page management by methods storage space, the list of document of single level directory file system (3), file allocation table (5) are used the floating address method storage, the variation of list of document in the memory ram (3) and file allocation table (5), real-time online writes Flash storer delta file registration form (4) and delta file allocation table (6) with incremental form; The relevant information of list of document in the single level directory file system (3) and file allocation table (5) writes in the redundancy bytes of the relevant Flash block page, as the backup of single level directory file system simultaneously.
2. set up the method for file system in a kind of embedded system according to claim 1 on the NAND Flash storer, it is characterized in that described single level directory file system is made up of system information and boot district (1), the floating address pointer gauge (2) that points to list of document (3), list of document (3), delta file registration form (4), file allocation table (5), delta file allocation table (6) and data field (7); List of document (3), delta file registration form (4), file allocation table (5), delta file allocation table (6) are with movably data mode storage, by floating address pointer gauge (2) addressing of system information and boot district (1) and sensing list of document (3); When list of document (3), delta file registration form (4), file allocation table (5), the change of delta file allocation table (6) memory address, new address is write the floating address pointer gauge (2) that points to list of document (3), according to list of document (3), delta file registration form (4), file allocation table (5), delta file allocation table (6) four table erasing times, move above-mentioned four tables to new Flash storage block, discharge the four former storage blocks of showing as DSB data store block, and no longer bear four table storage block functions.
3. set up the method for file system in a kind of embedded system according to claim 1 on the NAND Flash storer, it is characterized in that described single level directory file system copies to when moving the RAM from Flash, not only revise list of document (3) and file allocation table (5) in the memory ram, content be will revise simultaneously and delta file registration form (4) and delta file allocation table (6) in the Flash storer write with the form of increment information, recover list of document (3) and file allocation table (5) in the Flash storer with this increment information during fault, when list of document (3) and file allocation table (5) are upgraded, follow to write earlier and afterwards wipe principle.
4. set up the method for file system in a kind of embedded system according to claim 1 on the NAND Flash storer, it is characterized in that described single level directory file system utilizes the byte of each page redundancy of Flash storer, write reference number of a document, filename, generation or the last modification time of file system, a last block address of this document, the relevant information of next block address, as the redundancy backup of Flash memory file system list of document (3) and file allocation table (5).
CNB2007101562078A 2007-09-30 2007-09-30 Method for building file systems on NAND flash memory in embedded system Expired - Fee Related CN100449549C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101562078A CN100449549C (en) 2007-09-30 2007-09-30 Method for building file systems on NAND flash memory in embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101562078A CN100449549C (en) 2007-09-30 2007-09-30 Method for building file systems on NAND flash memory in embedded system

Publications (2)

Publication Number Publication Date
CN101140586A CN101140586A (en) 2008-03-12
CN100449549C true CN100449549C (en) 2009-01-07

Family

ID=39192538

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101562078A Expired - Fee Related CN100449549C (en) 2007-09-30 2007-09-30 Method for building file systems on NAND flash memory in embedded system

Country Status (1)

Country Link
CN (1) CN100449549C (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8090692B2 (en) * 2008-09-10 2012-01-03 Infinite Memory Ltd Method for using an OTP storage device
CN101685675B (en) * 2008-09-26 2014-01-15 美光科技公司 Operation of memory unit
CN102508782B (en) * 2011-09-29 2014-09-10 北京星网锐捷网络技术有限公司 Data read-write method, data read-write device, memory bank and network equipment
CN102521289B (en) * 2011-11-29 2013-12-04 华为技术有限公司 File synchronization method, device and system
CN103514063B (en) * 2012-06-21 2017-02-01 浙江大华技术股份有限公司 Method and device for processing FLASH data
CN102789425B (en) * 2012-07-17 2016-01-20 上海金智晟东电力科技有限公司 Based on the file read/write method of FLASH storage medium
CN103425546A (en) * 2013-08-14 2013-12-04 江苏林洋电子股份有限公司 General high-efficient reliable Nor Flash data memory management method
CN103412779B (en) * 2013-08-14 2016-12-28 浙江大学 A kind of patch file network system realization of embedded real-time operating system
CN104598260B (en) * 2013-10-31 2017-12-29 安凯(广州)微电子技术有限公司 A kind of list items mark, addition and the method and device of modification
CN108536554A (en) * 2018-04-26 2018-09-14 威海海洋职业学院 A kind of backup method of data file
CN112231244B (en) * 2020-12-21 2021-04-20 深圳杰睿联科技有限公司 SIM card file erasing and writing system and method applied to SoftSIM and readable storage medium
CN113703985B (en) * 2021-09-23 2023-10-10 瑞芯微电子股份有限公司 Memory management method, medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737759A (en) * 2005-08-27 2006-02-22 海信集团有限公司 Method for direct establishing read-only file system in Nand Flash memory
CN1822230A (en) * 2006-03-02 2006-08-23 浙江大学 Method for realizing memory file system based on NAND Flash
WO2007066909A1 (en) * 2005-12-08 2007-06-14 Electronics And Telecommunications Research Institute Method for guarantying data storing space using dual journaling
CN101013397A (en) * 2007-02-08 2007-08-08 深圳万利达电子工业有限公司 Method for implementing nandflsh file system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737759A (en) * 2005-08-27 2006-02-22 海信集团有限公司 Method for direct establishing read-only file system in Nand Flash memory
WO2007066909A1 (en) * 2005-12-08 2007-06-14 Electronics And Telecommunications Research Institute Method for guarantying data storing space using dual journaling
CN1822230A (en) * 2006-03-02 2006-08-23 浙江大学 Method for realizing memory file system based on NAND Flash
CN101013397A (en) * 2007-02-08 2007-08-08 深圳万利达电子工业有限公司 Method for implementing nandflsh file system

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
军用嵌入式系统中的Flash文件系统设计. 黄珊.现代电子技术,第16期. 2003
军用嵌入式系统中的Flash文件系统设计. 黄珊.现代电子技术,第16期. 2003 *
基于现场监测的嵌入式Flash文件系统的设计和实现. 何永琦,符欲梅,谭靖,董辉.微计算机应用,第25卷第3期. 2004
基于现场监测的嵌入式Flash文件系统的设计和实现. 何永琦,符欲梅,谭靖,董辉.微计算机应用,第25卷第3期. 2004 *
嵌入式文件系统在移动数据采集器中的实现. 陈惠滨.陈仅星.电子器件,第28卷第3期. 2005
嵌入式文件系统在移动数据采集器中的实现. 陈惠滨.陈仅星.电子器件,第28卷第3期. 2005 *

Also Published As

Publication number Publication date
CN101140586A (en) 2008-03-12

Similar Documents

Publication Publication Date Title
CN100449549C (en) Method for building file systems on NAND flash memory in embedded system
US9547589B2 (en) Endurance translation layer (ETL) and diversion of temp files for reduced flash wear of a super-endurance solid-state drive
US8959280B2 (en) Super-endurance solid-state drive with endurance translation layer (ETL) and diversion of temp files for reduced flash wear
US8130554B1 (en) Securely erasing flash-based memory
US8301861B2 (en) Startup reconstruction of logical-to-physical address translation data for solid state disks
EP2382547B1 (en) Logical address offset
US8762622B2 (en) Enhanced MLC solid state device
CN101515276B (en) Method for write operation of file data, and recovery method and recovery system for file data
CN101382918B (en) NAND flash memory optimizing and managing method based on data interchange zone
EP2389631B1 (en) Solid state memory formatting
CN115461727A (en) Asynchronous power down handling in sequentially programmed memory subsystems
CN100565477C (en) A kind of dynamic management approach of NAND Flash storer
KR102663661B1 (en) Apparatus and method for controlling data stored in memory system
US9009396B2 (en) Physically addressed solid state disk employing magnetic random access memory (MRAM)
CN100501868C (en) Method for realizing memory file system based on NAND Flash
US20150212752A1 (en) Storage system redundant array of solid state disk array
US20130080687A1 (en) Solid state disk employing flash and magnetic random access memory (mram)
CN110806984B (en) Apparatus and method for searching for valid data in memory system
Oh et al. SHARE interface in flash storage for relational and NoSQL databases
CN114730300B (en) Enhanced file system support for zone namespace memory
CN100533408C (en) Flashmemory safety read-write method
US8069299B2 (en) Banded indirection for nonvolatile memory devices
KR20070096429A (en) Fast mounting for a file system on nand flash memory
US20090172269A1 (en) Nonvolatile memory device and associated data merge method
CN110895448A (en) Apparatus and method for managing valid data in a memory system

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
EE01 Entry into force of recordation of patent licensing contract

Assignee: Zhejiang Boxsam Electronic Co., Ltd.

Assignor: Zhejiang University

Contract record no.: 2012330000007

Denomination of invention: Method for building file systems on NAND flash memory in embedded system

Granted publication date: 20090107

License type: Exclusive License

Open date: 20080312

Record date: 20120110

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090107

Termination date: 20190930

CF01 Termination of patent right due to non-payment of annual fee