vxworks建tffs文件系统

TFFS文件系统中nor flash的翻译层来处理nand flash(模拟nor flash),当读写大文件时就会出错(不稳定),因此需要使用nand flash的翻译层。

但是由于Tornado 2.0以前才支持nand flash文件系统,Tornado 2.2以后的版本要使用nand flash的翻译层需要从Tornado 2.0中移植,NFTL翻译层需要检测nand flash 每页(paga)的spare空间的第6、7位的标记,因此在向一个page写入数据时,同时需要向相应的spare空间的第6、7位写入0x55作为块使用标记,否则在文件系统格式化检测时会失败。

Table of Contents 1 Introduction ...................................................................................................... 4 1.1 Scope ................................................................................................................... 4 1.2 Background ......................................................................................................... 4 1.3 Overview ............................................................................................................. 4 1.4 Implemented File Functionality ......................................................................... 5 1.4.1 Basic ............................................................................................................................... 5 1.4.2 Access Attributes ............................................................................................................ 5 1.4.3 Protective Mode .............................................................................................................. 7 1.4.4 Access Monitor ............................................................................................................... 7 1.5 Disk Usage Saturation ........................................................................................ 7 2 Application Programming Interfaces (APIs) .................................................. 9 2.1 The TFFS Protection Application Programming Interface (TP-API) ................ 9 2.1.1 TFFS Usage Protection .................................................................................................. 9 2.1.1.1 Pseudo Code Example .......................................................................................... 9 2.1.1.2 Posix Code Example ............................................................................................ 10 2.1.1.3 sig_semRead ....................................................................................................... 11 2.1.1.4 sig_semWrite ....................................................................................................... 11 2.1.1.5 wai_semRead ...................................................................................................... 11 2.1.1.6 wai_semWrite....................................................................................................... 11 2.1.2 Protective Mode Application Programming Interface ................................................... 11 2.1.3 Monitor Protection Application Programming Interface ................................................ 11 2.2 The TFFS User Application Programming Interface (TU-API) ....................... 13 2.2.1 tffsChange .................................................................................................................... 13 2.2.2 tffsChdir ........................................................................................................................ 14 2.2.3 tffsClearerr .................................................................................................................... 14 2.2.4 tffsDelete ....................................................................................................................... 15 2.2.5 tffsDiagMode ................................................................................................................. 15 2.2.6 tffsExists ....................................................................................................................... 16 2.2.7 tffsFclose ...................................................................................................................... 16 2.2.8 tffsFeof .......................................................................................................................... 17 2.2.9 tffsFerror ....................................................................................................................... 17 2.2.10 tffsFflush ....................................................................................................................... 17 2.2.11 tffsFopen ....................................................................................................................... 18 2.2.12 tffsFormat ...................................................................................................................... 19 2.2.13 tffsFread ........................................................................................................................ 20 2.2.14 tffsFseek ....................................................................................................................... 20 2.2.15 tffsFwrite ....................................................................................................................... 21 2.2.16 tffsGetBlockInfo ............................................................................................................ 21 2.2.17 tffsGetPath .................................................................................................................... 22 2.2.18 tffsGetRoot .................................................................................................................... 22 2.2.19 tffsInit ............................................................................................................................ 22 2.2.20 tffsLsdir ......................................................................................................................... 23 2.2.21 tffsMkdir ........................................................................................................................ 24 2.2.22 tffsMonitorAdd ............................................................................................................... 25 2.2.23 tffsMonitorRemove ........................................................................................................ 26 2.2.24 tffsMount ....................................................................................................................... 27 2.2.25 tffsReclaim .................................................................................................................... 28 2.2.26 tffsResize ...................................................................................................................... 29 2.2.27 tffsRewind ..................................................................................................................... 29 2.2.28 tffsTruncate ................................................................................................................... 30 2.2.29 tffsUnmount .................................................................................................................. 30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值