ubifs - master node
来源:互联网 发布:交通数据采集标准规范 编辑:程序博客网 时间:2024/06/14 05:21
master node
-存储经常更改的数据
-LEB1和LEB2用来存储两份相同的master node
-拥有最大序列号的master node是最后更新的信息
-每个inode numer只用一次
一个master node,占用512字节。
fs/ubifs/ubifs-media.h
/**
* struct ubifs_mst_node - master node.
*/
struct ubifs_mst_node {
struct ubifs_ch ch; // * @ch: common header
__le64 highest_inum; // * @inode序列号,最大数有效,每创建一个新文件就会加1
__le64 cmt_no; // * @cmt_no: 系统最后commit 序列号
__le32 flags; // * @flags: various flags (%UBIFS_MST_DIRTY, etc)
__le32 log_lnum; //* @log_lnum: start of the log
__le32 root_lnum; // * @root_lnum: LEB number of the root indexing node
__le32 root_offs; // * @root_offs: offset within @root_lnum(root inode在leb内的偏移)
__le32 root_len; //* @root_len: root indexing node length
__le32 gc_lnum; // * @gc_lnum: LEB reserved for garbage collection (%-1 value means the LEB was not reserved and should be reserved on mount)
__le32 ihead_lnum; //* @ 记录可写入index node的LEB number,ihead_lnum存在的目的是区分index node与non-index node
__le32 ihead_offs; // * @ihead_offs: offset of index head
__le64 index_size; // * @index_size: size of index on flash
__le64 total_free; // * @total_free: total free space in bytes
__le64 total_dirty; // * @total_dirty: total dirty space in bytes
__le64 total_used; // * @total_used: total used space in bytes (includes only data LEBs)
__le64 total_dead; // * @total_dead: total dead space in bytes (includes only data LEBs)
__le64 total_dark; // * @total_dark: total dark space in bytes (includes only data LEBs)
__le32 lpt_lnum; // * @lpt_lnum: LEB number of LPT root nnode
__le32 lpt_offs; // * @lpt_offs: offset of LPT root nnode
__le32 nhead_lnum; // * @nhead_lnum: LEB number of LPT head
__le32 nhead_offs; // * @nhead_offs: offset of LPT head
__le32 ltab_lnum; // * @ltab_lnum: LEB number of LPT's own lprops table
__le32 ltab_offs; // * @ltab_offs: offset of LPT's own lprops table
__le32 lsave_lnum; // * @lsave_lnum: LEB number of LPT's save table (big model only)
__le32 lsave_offs; // * @lsave_offs: offset of LPT's save table (big model only)
__le32 lscan_lnum; // * @lscan_lnum: LEB number of last LPT scan
__le32 empty_lebs; // * @empty_lebs: number of empty logical eraseblocks
__le32 idx_lebs; // * @idx_lebs: number of indexing logical eraseblocks
__le32 leb_cnt; // * @leb_cnt: count of LEBs used by file-system
__u8 padding[344]; // * @padding: reserved for future, zeroes
} __packed;
更新master mode过程
1, 在LEB1中紧随最后一个master node写一个新的,直到空间用完
2,,如果没有空间,就remap LEB1,从offset 0位置写一个新的。
3,按照上述步骤更新LEB2的master node。
查找leb1、leb2来找到master node。
- ubifs- Master Node
- ubifs - master node
- UBIFS文件系统分析2 - master node管理
- UBIFS文件系统分析2 - master node管理 .
- UBIFS文件系统分析2 - master node管理
- ubifs master.c代码分析
- UBIFS
- UBIFS
- ubifs
- UBIFS
- ubifs
- ubifs?
- ubifs
- ubifs
- UBIFS
- No known master node问题
- ElasticSearch: no known master node
- ubifs- 六大区域 (superblock area, master area, log area, lpt area, orphan area, main area )
- Java FileInputStream与FileReader的区别
- 对C++中对象指针的理解
- 字符流的缓冲区
- Android 学习网站
- Java Simon--性能瓶颈分析工具
- ubifs - master node
- Hadoop的一些常识性介绍
- 虚拟机linux安装vmtools
- 关于Python Fault 管理半自动化心得[一]
- jpa双向一对一关联关系
- C/C++的指针经典面试题
- 2015/1/14
- 24个春夏秋冬
- Java基础--网络编程下篇