博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubifs相關
阅读量:4286 次
发布时间:2019-05-27

本文共 1738 字,大约阅读时间需要 5 分钟。

轉載自 

 

ubifs size問題討論

 

下面節錄至

What is the purpose of -c (--max-leb-cnt) mkfs.ubifs option?

It is a form of specifying file-system size. But instead of specifying the exact file-system size, this option defines the maximum file-system size (more strictly, maximum UBI volume size). For example, if you use --max-leb-cnt=200 mkfs.ubifs option, then it will be possible to put the resulting image to smaller UBI volume and mount it. But if the image is put to a larger UBI volume, the file-system will anyway take only first 200 LEBs, and the rest of the volume will be wasted.

Note, the --max-leb-cnt option does not affect the size of the resulting image file, which depends only on the amount of data in the file-system. mkfs.ubifs just writes the --max-leb-cnt value to the file-system superblocks.

This feature is quite handy on NAND flashes, because they have a random amount of initial bad eraseblocks (marked as bad in production). This means that different devices may have slightly different volume sizes (especially if the UBI  feature is used). So you may specify the maximum possible volume size and this will guarantee that the image will work on all devices, irrespectively on the amount of initial bad eraseblocks.

Fundamentally, mkfs.ubifs has to know file-system size because UBIFS maintains and stores per-LEB information (like amount of dirty and free space in each LEB) in so-called LPT area on the media. So obviously, the size of this area depends on the total amount of LEBs, i.e. on the volume size. Note, various characteristics of the LPT B-tree depend on the LPT area size, e.g., we use less bits in LPT tree keys of smaller LPT area. So do not use unnecessarily large --max-leb-cnt value to achieve better performance.

转载地址:http://dwpgi.baihongyu.com/

你可能感兴趣的文章
Matlab 条形图绘制 以及 添加误差棒 改变条形图形状
查看>>
cmake基本用法
查看>>
matlab 增加或减少图例 legend 线的长度
查看>>
matlab:把cell中的某个元素删去
查看>>
matlab 集合运算 交集 并集 差集
查看>>
C++ 给vector去重的三种方法
查看>>
map的详细用法
查看>>
C++初始化函数列表
查看>>
STL各种排序
查看>>
#include<map>
查看>>
z字形扫描
查看>>
相邻数对
查看>>
C++ string 字符串匹配
查看>>
C语言字符串函数大全
查看>>
轮盘赌选择,原理及C++实现
查看>>
C/C++中各种类型int、long、double、char表示范围(最大最小值)
查看>>
《Python爬虫学习系列教程》学习笔记
查看>>
MIC编程(4)——MIC灵活高效的编程方式
查看>>
Apriori算法
查看>>
Python itertools模块详解
查看>>