Transcript 支持fatfs

目录
 理解lab6的文件系统
 确定如何支持fatfs
 简化的文件系统
 下阶段工作
lab6的文件系统
fs_init()
Sys Call
fs.c
sysfile.c
file.c
vfs
dev
pipe
sfs
mount
stdio
other
Disk0
Disk1
fatfs
lab6的文件系统
fs-specific inode
Inode
Proc:
Fs_struct
In_info
pwd
In_type
Counts
In_ops
Fs_count
Fs_sem
fs
inode
filema
p
fs_func()
In_fs
node
file
fs_type
fs-specific fs
Stdin,fd=0
fd
Stdout, fd=1
Status
Privileges
Count
pos
fs_info
lab6的文件系统
支持fatfs
vfs
fs
inode
fatfs
FATFS
Config
FIL/DIR
fatfs-standard
DRIVE buffer C/H/S
Disk IO
buffer C/H/S
Disk1
支持fatfs
 Granularity:
 inode对应DIR和FIL
 fs对应FATFS
 Cache & sync
 由fatfs自己处理,其提供f_sync函数
 Re-entrancy
 _FS_REENTRANT选项=0
 由vfs_op完成
支持fatfs
 Disk io
 Fatfs需要底层disk io函数支持
 使用驱动器号访问,支持10个驱动器
 Filename
 "[drive#:][/]directory/file"
 支持相对路径,LFN和SFN,同时提供支持Unicode的API
调用。
 Critical section
 f_sync,f_close
简化的文件系统
 Flat Directory
 Remove dirops:
 mkdir, create, truncate,
 link, unlink, rename
 Lookup_parent
 Remove pipe/fifo
 Thin the vfs layer
 Proj19~5700 lines, now reduced 1500lines
下阶段工作
 Simple Linked FileSystem
 DMA
 Buffer cache




Implement in the vfs layer
cache replacement algorithm
write-behind
read-ahead
 Boot from USB Device
撰写的wiki

Lab6文件系统的理解:
http://code.google.com/p/u9proj/wiki/fs_dir_remark

拼接fatfs:
http://code.google.com/p/u9proj/wiki/fatfs_vfs_connection

简化文件系统Q:
http://code.google.com/p/u9proj/wiki/simple_indexed_fs_QA

Buffer cache的理解:
http://code.google.com/p/u9proj/wiki/buffer_cache