Home
last modified time | relevance | path

Searched full:ubi (Results 1 – 25 of 55) sorted by relevance

123

/linux/drivers/mtd/ubi/
H A Dvmt.c17 #include "ubi.h"
19 static int self_check_volumes(struct ubi_device *ubi);
24 /* Device attributes corresponding to files in '/<sysfs>/class/ubi/ubiX_Y' */
43 * "Show" method for files in '/<sysfs>/class/ubi/ubiX_Y/'.
47 * /<sysfs>/class/ubi/ubiX_Y/reserved_ebs;
49 * C. process 1 starts reading the /<sysfs>/class/ubi/ubiX_Y/reserved_ebs file;
52 * out that the volume was removed from the @ubi->volumes array.
59 struct ubi_device *ubi = vol->ubi; in vol_attribute_show() local
61 spin_lock(&ubi->volumes_lock); in vol_attribute_show()
62 if (!ubi->volumes[vol->vol_id] || ubi->volumes[vol->vol_id]->is_dead) { in vol_attribute_show()
[all …]
H A Ddebug.h11 void ubi_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len);
19 pr_crit("UBI assert failed in %s at %u (pid %d)\n", \
29 pr_debug("UBI DBG " type " (pid %d): " fmt "\n", current->pid, \
48 int ubi_self_check_all_ff(struct ubi_device *ubi, int pnum, int offset,
52 int ubi_debugfs_init_dev(struct ubi_device *ubi);
53 void ubi_debugfs_exit_dev(struct ubi_device *ubi);
56 * The following function is a legacy implementation of UBI fault-injection
60 int ubi_dbg_power_cut(struct ubi_device *ubi, int caller);
62 static inline int ubi_dbg_bitflip(const struct ubi_device *ubi) in ubi_dbg_bitflip() argument
64 if (ubi->dbg.emulate_bitflips) in ubi_dbg_bitflip()
[all …]
H A Dvtbl.c29 * In this UBI implementation the on-flash volume table does not contain any
52 #include "ubi.h"
54 static void self_vtbl_check(const struct ubi_device *ubi);
61 * @ubi: UBI device description object
63 static int ubi_update_layout_vol(struct ubi_device *ubi) in ubi_update_layout_vol() argument
68 layout_vol = ubi->volumes[vol_id2idx(ubi, UBI_LAYOUT_VOLUME_ID)]; in ubi_update_layout_vol()
70 err = ubi_eba_atomic_leb_change(ubi, layout_vol, i, ubi->vtbl, in ubi_update_layout_vol()
71 ubi->vtbl_size); in ubi_update_layout_vol()
81 * @ubi: UBI device description object
90 int ubi_change_vtbl_record(struct ubi_device *ubi, int idx, in ubi_change_vtbl_record() argument
[all …]
H A Deba.c9 * The UBI Eraseblock Association (EBA) sub-system.
34 #include "ubi.h"
62 * @ubi: UBI device description object
68 unsigned long long ubi_next_sqnum(struct ubi_device *ubi) in ubi_next_sqnum() argument
72 spin_lock(&ubi->ltree_lock); in ubi_next_sqnum()
73 sqnum = ubi->global_sqnum++; in ubi_next_sqnum()
74 spin_unlock(&ubi->ltree_lock); in ubi_next_sqnum()
81 * @ubi: UBI device description object
87 static int ubi_get_compat(const struct ubi_device *ubi, int vol_id) in ubi_get_compat() argument
198 * @ubi: UBI device description object
[all …]
H A Dmisc.c8 /* Here we keep miscellaneous functions which are used all over the UBI code */
10 #include "ubi.h"
14 * @ubi: UBI device description object
22 int ubi_calc_data_len(const struct ubi_device *ubi, const void *buf, in ubi_calc_data_len() argument
27 ubi_assert(!(length & (ubi->min_io_size - 1))); in ubi_calc_data_len()
34 length = ALIGN(i + 1, ubi->min_io_size); in ubi_calc_data_len()
40 * @ubi: UBI device description object
48 int ubi_check_volume(struct ubi_device *ubi, int vol_id) in ubi_check_volume() argument
52 struct ubi_volume *vol = ubi->volumes[vol_id]; in ubi_check_volume()
71 err = ubi_eba_read_leb(ubi, vol, i, buf, 0, size, 1); in ubi_check_volume()
[all …]
H A Dkapi.c8 /* This file mostly implements UBI kernel API functions */
16 #include "ubi.h"
19 * ubi_do_get_device_info - get information about UBI device.
20 * @ubi: UBI device description object
23 * This function is the same as 'ubi_get_device_info()', but it assumes the UBI
26 void ubi_do_get_device_info(struct ubi_device *ubi, struct ubi_device_info *di) in ubi_do_get_device_info() argument
28 di->ubi_num = ubi->ubi_num; in ubi_do_get_device_info()
29 di->leb_size = ubi->leb_size; in ubi_do_get_device_info()
30 di->leb_start = ubi->leb_start; in ubi_do_get_device_info()
31 di->min_io_size = ubi->min_io_size; in ubi_do_get_device_info()
[all …]
H A DKconfig3 tristate "Enable UBI - Unsorted block images"
6 UBI is a software layer above MTD layer which admits use of LVM-like
15 int "UBI wear-leveling threshold"
21 of UBI devices. When this threshold is exceeded, UBI starts performing
36 This option specifies the maximum bad physical eraseblocks UBI
47 To put it differently, if this value is 20, UBI will try to reserve
50 partition UBI attaches. This means that if you have, say, a NAND
52 MTD partitions of the same size, UBI will reserve 40 eraseblocks when
55 This option can be overridden by the "mtd=" UBI module parameter or
61 bool "UBI Fastmap (Experimental feature)"
[all …]
H A Dupd.c19 * marker stays on the flash media and UBI finds it when it attaches the MTD
31 #include "ubi.h"
35 * @ubi: UBI device description object
41 static int set_update_marker(struct ubi_device *ubi, struct ubi_volume *vol) in set_update_marker() argument
49 ubi_assert(ubi->vtbl[vol->vol_id].upd_marker); in set_update_marker()
54 vtbl_rec = ubi->vtbl[vol->vol_id]; in set_update_marker()
57 mutex_lock(&ubi->device_mutex); in set_update_marker()
58 err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec); in set_update_marker()
60 mutex_unlock(&ubi->device_mutex); in set_update_marker()
66 * @ubi: UBI device description object
[all …]
H A Ddebug.c8 #include "ubi.h"
47 * @ubi: UBI device description object in FAIL_ACTION()
52 void ubi_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len) in FAIL_ACTION()
57 loff_t addr = (loff_t)pnum * ubi->peb_size + offset; in FAIL_ACTION()
62 err = mtd_read(ubi->mtd, addr, len, &read, buf); in FAIL_ACTION()
64 ubi_err(ubi, "err %d while reading %d bytes from PEB %d:%d, read %zd bytes", in FAIL_ACTION()
69 ubi_msg(ubi, "dumping %d bytes of data from PEB %d, offset %d", in FAIL_ACTION()
123 * @vol: UBI volume description object
240 * Root directory for UBI stuff in debugfs. Contains sub-directories which
241 * contain the stuff specific to particular UBI devices.
[all …]
H A Dwl.h7 static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi);
8 static struct ubi_wl_entry *next_peb_for_wl(struct ubi_device *ubi,
10 static bool need_wear_leveling(struct ubi_device *ubi);
11 static void ubi_fastmap_close(struct ubi_device *ubi);
12 static inline void ubi_fastmap_init(struct ubi_device *ubi, int *count) in ubi_fastmap_init() argument
14 if (ubi->fm_disabled) in ubi_fastmap_init()
15 ubi->fm_pool_rsv_cnt = 0; in ubi_fastmap_init()
17 *count += (ubi->fm_size / ubi->leb_size) * 2 + ubi->fm_pool_rsv_cnt; in ubi_fastmap_init()
18 INIT_WORK(&ubi->fm_work, update_fastmap_work_fn); in ubi_fastmap_init()
20 static struct ubi_wl_entry *may_reserve_for_fm(struct ubi_device *ubi,
[all …]
H A Dubi-media.h10 * This file defines the layout of UBI headers and all the other UBI on-flash
19 /* The version of UBI images supported by this implementation */
28 /* Erase counter header magic number (ASCII "UBI#") */
30 /* Volume identifier header magic number (ASCII "UBI!") */
55 * table. UBI automatically re-sizes the volume which has this flag and makes
57 * initialization UBI finds out that there are available physical eraseblocks
62 * eraseblocks will be zero after UBI is loaded, because all of them will be
70 * exceed certain percent, e.g. 2%. When one creates an UBI image which will be
74 * table of the UBI image. In this case, one of the volumes (e.g., the one
76 * UBI will adjust its size on the first boot if needed.
[all …]
H A Dgluebi.c9 * This is a small driver which implements fake MTD devices on top of UBI
12 * UBI.
15 * size (@mtd->writesize) is equivalent to the UBI minimal I/O unit. The
26 #include <linux/mtd/ubi.h>
28 #include "ubi-media.h"
38 * @desc: UBI volume descriptor
39 * @ubi_num: UBI device number this gluebi device works on
40 * @vol_id: ID of UBI volume this gluebi device works on
58 * @ubi_num: UBI device number
61 * This function seraches for gluebi device corresponding to UBI device
[all …]
H A DMakefile2 obj-$(CONFIG_MTD_UBI) += ubi.o
4 ubi-y += vtbl.o vmt.o upd.o build.o cdev.o kapi.o eba.o io.o wl.o attach.o
5 ubi-y += misc.o debug.o
6 ubi-$(CONFIG_MTD_UBI_FASTMAP) += fastmap.o
7 ubi-$(CONFIG_MTD_UBI_BLOCK) += block.o
H A Dnvmem.c6 /* UBI NVMEM provider */
7 #include "ubi.h"
137 * nvmem_notify - UBI notification handler.
189 MODULE_DESCRIPTION("NVMEM layer over UBI volumes");
/linux/Documentation/ABI/stable/
H A Dsysfs-class-ubi1 What: /sys/class/ubi/
6 The ubi/ class sub-directory belongs to the UBI subsystem and
7 provides general UBI information, per-UBI device information
8 and per-UBI volume information.
10 What: /sys/class/ubi/version
15 This file contains version of the latest supported UBI on-media
17 However, if in the future UBI needs on-flash format changes
29 UBI devices (UBI device 0, 1, etc). They contain general UBI
30 device information and per UBI volume information (each UBI
31 device may have many UBI volumes)
[all …]
/linux/Documentation/translations/zh_CN/filesystems/
H A Dubifs.rst16 UBI 文件系统
22 UBIFS 文件系统全称为 UBI 文件系统(UBI File System)。UBI 代表无序块镜
42 UBIFS 工作在 UBI 层之上。UBI 是一个独立的软件层(位于 drivers/mtd/ubi),
43 本质上是卷管理和磨损均衡层。它提供称为 UBI 卷的高级抽象,比 MTD 设备更上层。
44 UBI 设备的编程模型与 MTD 设备非常相似,仍由大容量擦除块组成,支持读/写/擦
45 除操作,但 UBI 设备消除了磨损和坏块限制(上述列表的第 4 和第 5 项)。
50 * JFFS2 工作在 MTD 设备之上,UBIFS 依赖于 UBI 并工作在 UBI 卷之上。
63 索引。但 UBIFS 依赖于线性扩展的 UBI 层,因此整体 UBI/UBIFS 栈仍是线性扩
64 展。尽管如此,UBIFS/UBI 的扩展性仍显著优于 JFFS2。
67 UBI 相同的 API,但二进制不兼容。因此 UBIFS 无需修改即可使用 UBI2。
[all …]
H A Dubifs-authentication.rst41 MTD, UBI & UBIFS
44 MTD 之上的重要子系统是 UBI(无序块映像),它为闪存设备提供卷管理功能,类似
45 于块设备的 LVM。此外,UBI 还处理闪存特有的磨损均衡和透明 I/O 错误处理。
46 UBI 向上层提供逻辑擦除块(LEB),并透明地映射到闪存的物理擦除块(PEB)。
48 UBIFS 是运行于 UBI 之上的裸闪存文件系统。因此 UBI 处理磨损均衡和部分闪存
54 | | * UBIFS * | UBI-BLOCK | | ... |
57 | | | UBI | | MTD-BLOCK | | ... |
76 - *LEB属性树(LPT)*:用于统计每个 UBI LEB 空闲空间的闪存B+树
97 最新索引,UBIFS 在 UBI LEB 1 存储称为 *主节点* 的特殊节点,始终指向最新
185 版本而不覆盖旧版本,UBI 的磨损均衡操作(将内容从物理擦除块复制到另一擦除块
[all …]
/linux/Documentation/filesystems/
H A Dubifs.rst4 UBI File System
10 UBIFS file-system stands for UBI File System. UBI stands for "Unsorted
41 UBIFS works on top of UBI. UBI is a separate software layer which may be
42 found in drivers/mtd/ubi. UBI is basically a volume management and
43 wear-leveling layer. It provides so called UBI volumes which is a higher
44 level abstraction than a MTD device. The programming model of UBI devices
46 they have read/write/erase operations, but UBI devices are devoid of
53 * JFFS2 works on top of MTD devices, UBIFS depends on UBI and works on
54 top of UBI volumes.
74 UBI, which scales linearly. So overall UBI/UBIFS stack scales linearly.
[all …]
/linux/Documentation/devicetree/bindings/mtd/partitions/
H A Dlinux,ubi.yaml4 $id: http://devicetree.org/schemas/mtd/partitions/linux,ubi.yaml#
10 UBI ("Unsorted Block Images") is a volume management system for raw
23 const: linux,ubi
27 description: UBI Volumes
30 "^ubi-volume-.*$":
31 $ref: /schemas/mtd/partitions/ubi-volume.yaml#
55 label = "ubi";
56 compatible = "linux,ubi";
59 ubi-volume-caldata {
H A Dubi-volume.yaml4 $id: http://devicetree.org/schemas/mtd/partitions/ubi-volume.yaml#
7 title: UBI volume
10 This binding describes a single UBI volume. Volumes can be matches either
20 Match UBI volume ID
25 Match UBI volume ID
/linux/Documentation/devicetree/bindings/nvmem/layouts/
H A Du-boot,env.yaml19 2. UBI volume
123 label = "ubi";
124 compatible = "linux,ubi";
127 ubi-volume-u-boot-env {
/linux/arch/arm/boot/dts/microchip/
H A Dat91-kizboxmini-common.dtsi15 bootargs = "ubi.mtd=ubi";
152 ubi@20000 {
153 label = "ubi";
H A Dat91-kizbox.dts17 bootargs = "ubi.mtd=ubi";
148 ubi@20000 {
149 label = "ubi";
/linux/fs/ubifs/
H A Dmisc.c16 pr_notice("UBIFS (ubi%d:%d): %pV\n", in ubifs_msg()
33 pr_err("UBIFS error (ubi%d:%d pid %d): %ps: %pV\n", in ubifs_err()
52 pr_warn("UBIFS warning (ubi%d:%d pid %d): %ps: %pV\n", in ubifs_warn()
/linux/drivers/mtd/parsers/
H A Dparser_trx.c17 #define UBI_EC_MAGIC 0x23494255 /* UBI# */
44 return "ubi"; in parser_trx_data_part_name()

123