ubifs- Master Node

本文介绍了UBI中主节点的存储方式及其重要性。主节点保存了所有非固定逻辑位置的闪存结构的位置信息,并被重复写入到逻辑擦除块LEB1和LEB2中以确保数据的冗余性和恢复能力。通过使用两个逻辑擦除块来保存主节点的两个副本,即使遇到电源丢失或介质损坏的情况也能提高系统的可靠性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原创译文:

主节点(master node)存储在逻辑擦除块 LEB1 和 LEB2。
LEBs 逻辑擦除块是UBI 创建抽象出来的概念。UBI 建立物理擦除块(PEBs)和逻辑擦除块(LEBs)的映射关系,因此,LEB1 和 LEB2 可能映射到flash(确切的说是UBI device)的任何位置,但是,UBI会一直记录他们的位置。
使用两个擦除块是为了保存两份master node,用于恢复使用。


The master node stores the position of all on-flash structures that are not at fixed logical positions. The master node itself is written repeatedly to logical eraseblocks (LEBs) one and two.

LEBs are an abstraction created by UBI. UBI maps physical eraseblocks (PEBs) to LEBs, so LEB one and two can be anywhere on the flash media (strictly speaking, the UBI device), however UBI always records where they are.

Two eraseblocks are used in order to keep two copies of the master node. This is done for the purpose of recovery, because there are two situations that can cause a corruptor missing master node.

The first is that there could be a loss of power at the same instant that the master node is being written. The second is that there could be degradation or corruption of the flash media itself.

In the first case, recovery is possible because the previous version of the master node can be used. In the second case, recovery is not possible because it cannot be determined reliably what is a valid master node version.

In that latter case, a userspace utility program would be needed to analyze all the nodes on the media and attempt to fix or recreate corrupt or missingnodes.

Having two copies of the master node makes it possible to determine which situation has arisen, and respond accordingly.



Master Node 保存在Master Area, Master node 指向Wandering Tree的 root 节点。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值