日志结构文件系统在嵌入式系统上的应用
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
对嵌入式系统来说,非正常断电随时可能发生,它会导致文件系统的不一致性,带来文件系统的破坏和数据信息的丢失。因此,在嵌入式存储设备上,设计和实现一种具有掉电安全特性的文件系统具有特别重要的意义,日志文件系统通过记录日志的方法来防止文件系统的异常破坏,这正是我们需要的防断电文件系统。
     本文在介绍了几种不同类型的文件系统并比较了它们的优劣后,结合这些分析,我们分析了日志文件系统JFFS2的设计思想和层次结构,研究了JFFS2是如何满足掉电安全性的要求以及如何考虑闪存存储设备特殊属性的问题。接着,本文着重阐述了在嵌入式操作系统Nucleus上移植JFFS2的系统过程,整个系统移植过程包括:MTD物理接口层在Nucleus上的接口实现方案;通过分析对比Nucleus与Linux的系统差异,提出利用系统抽象层去解决JFFS2的系统依赖性问题;简化VFS及用户接口层使得JFFS2能够更为方便的为应用层所使用。
     最后,文章展望了日志文件系统的应用前景,相信日志结构的闪存文件系统随着技术的成熟必然会凭其优势在嵌入式产品中得到越来越广泛地应用。
In embedded systems,unexpected power - off often occurs. For a normal kind of file system,unexpected power-off often causes the corruption of the file system and the lose of data。So fore,it is very important to design and implement a special kind of file system to prevent such corruption. Journaling File System is just such kind file system we need.
     In this paper,we compare several kinds of file systems and point out the deference between them. On the base of analysis above,we analyse the design idea and architecure of JFFS2,a special journaling file system which considere the special read-write characters of Flash devices how to prevent corruption caused by unexpected power-off. At the last part of the paper,we put emphasis on the process that porting JFFS2 system to the Nucleus embedded system. The totally process focus on: the implementation of MTD driver on Nucleus to support Intel FLASH memory; through compare the operation system between Nucleus and Linux to get the system difference, then bring forward and implement an abstract operation system layer to make the JFFS2 porting little dependence; predigest the VFS layer and user interface to make the JFFS2 to be easy using without lot of effort.
     Then we prospect the foreground of log-structure file system implementation,we think Journaling File System will be used far and wide in the embedded FLASH system with the technical improvement.
引文
[1] Daniel P.Bovet, Marco Cesati. 深入理解 Linux 内核[M]. 北京:中国电力出版社. 2001.10.
    [2] 毛德操,胡希明. LINUX 内核源代码情景分析 [M]. 杭州:浙江大学出版社. 2001.9.
    [3] David Woodhouse. JFFS2: The Journaling Flash File System http://sources.redhat.com/jffs2/ 2003.7
    [4] 张谦,裴海龙等. μC/OS-II 实时嵌入式操作系统在 AVR的实现. 微计算机信息,2004,4(20):6-8
    [5] 李善平,刘文峰,Linux 与嵌入式系统 [M] ,北京:清华大学出版社 2003.1
    [6] Bar Moshe,Linux Internals,McGraw-Hill,2000 年
    [7] Nutt Gary J,Kernel Projects for Linux, Addison-Wesley,2000 年
    [8] Maurice J Bach,The Design of the UNIX Operating System, Prentice Hall PTR,1990 年
    [9] ANTHONY J.MASSA,嵌入式可配置实时操作系统 ECOS 软件开发,北京航空航天大学出版社,2006 年 5 月
    [10] 黄燕平,μCOS ARM 移植要点详解,北京航空航天大学出版社,2005 年 11 月
    [11] 宋安俊,王成耀. JFFS2 文件系统超级块管理改进. 微计算机信息 [J] . 2006. 9-2:34-36
    [12] Intel StrataFlash Memory (M18) Datasheet. Intel Corporation 2006.11
    [13] Intel StrataFlash Memory (M18) Developer’s Manual. Intel Corporation 2006.11
    [14] Randal E.Bryant David O’Hallaron,Computer Systems A Programmer’s Perspective,Prentice Hall.Inc,2004年
    [15] Andrew S. Tanenbaum,Computer Networks (Third Edition), Prentice Hall.Inc,1998年7月
    [16] Butenhof, Programming with posix threads, Addison Wesley, 1997年
    [17] W. Richard Stevens,Advanced Programming in the UNIX Environment, 机械工业出版社, 2003年1月
    [18] http://www.mentor.com/products/embedded_software/nucleus_rtos/index.cfm. 在线手册
    [19] Nucleus Plus reference Manual Rev104. Accelerated Technology 2004
    [20] Intel? PXA27x Processor Family Developer’s Manual. Intel Corporation 2004.10