UFFS2 is under design. Compares to UFFS1, UFFS2 will have new features/improvements:
1) Reduce memory footprint by using smaller tree node data structure, save 20%~50% memory comparing with UFFS1.
typedef struct uffs_HeadNodeSt {
u16 block;
u16 info; //point to info node
u16 next;
u16 prev;
} uffs_LoadNode;
typedef struct uffs_InfoNodeSt {
u16 father;
u16 serial;
u16 sum;
u8 attr:2; //00 dir, 01 normal file, 10 symbol link, 11 reserved
u8 status:2; //data status:
u8 pageid;
} uffs_InfoNode;
typedef struct uffs_FreeNodeSt {
u16 block;
u16 next;
u16 prev;
} uffs_FreeNode;
typedef struct uffs_DataNodeSt {
u16 block;
u16 father;
u16 serial;
u8 status; //0 - no free page, 1 - has free page
u8 page; //first free page
} uffs_DataNode;
typedef struct uffs_TreeNodeSt {
union {
struct uffs_HeadNodeSt head;
struct uffs_DataNodeSt data;
struct uffs_FreeNodeSt free;
} u;
} TreeNode;
Tree nodes memory cost:
total_blocks * 8 + max_files_and_dirs * 8
e.g.:
for 1Gb NAND flash:
page sze: 512,
pages_per_block: 32,
total_blocks: 8192,
max_files_and_dirs: 1000
tree nodes memory cost: 8192 * 8 + 1000 * 8 = 72KB
(compares to UFFS1: 8192 * 16 = 131KB, save 45%)
2) Allow multiple files/dirs on one block. This will significantly improve flash space efficiency in many circumstances.
Directories and symbol link will only cost one page, small file cost 2~pages_per_block pages, configurable. Large files will use full block.
3) Move ECC to page spare.
ECC data are compatible with YAFFS2.
4) Support Linux VFS interface. This will allow using UFFS2 as file system in embedded linux.
UFFS2 can be used as root file system.
UFFS2文件系统改进
UFFS2相较于UFFS1减少了内存占用20%-50%,通过使用更小的节点数据结构实现。允许单个块上存在多个文件/目录,提高了闪存空间效率。目录和符号链接仅占用一页,小文件占用2-32页。将ECC移动到页面备用区,并且支持Linux VFS接口,可在嵌入式Linux中作为文件系统使用。
4991

被折叠的 条评论
为什么被折叠?



