Home
last modified time | relevance | path

Searched +full:ubi +full:- +full:volume +full:- (Results 1 – 25 of 34) sorted by relevance

12

/linux-6.12.1/drivers/mtd/ubi/
Dvtbl.c1 // SPDX-License-Identifier: GPL-2.0-or-later
10 * This file includes volume table manipulation code. The volume table is an
11 * on-flash table containing volume meta-data like name, number of reserved
12 * physical eraseblocks, type, etc. The volume table is stored in the so-called
13 * "layout volume".
15 * The layout volume is an internal volume which is organized as follows. It
16 * consists of two logical eraseblocks - LEB 0 and LEB 1. Each logical
17 * eraseblock stores one volume table copy, i.e. LEB 0 and LEB 1 duplicate each
18 * other. This redundancy guarantees robustness to unclean reboots. The volume
19 * table is basically an array of volume table records. Each record contains
[all …]
Dvmt.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * This file contains implementation of volume creation, deletion, updating and
17 #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/'.
46 * A. process 1 opens a sysfs file related to volume Y, say
47 * /<sysfs>/class/ubi/ubiX_Y/reserved_ebs;
48 * B. process 2 removes volume Y;
49 * C. process 1 starts reading the /<sysfs>/class/ubi/ubiX_Y/reserved_ebs file;
[all …]
Dkapi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 /* 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()
[all …]
Dubi.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
28 #include <linux/mtd/ubi.h>
31 #include "ubi-media.h"
33 /* Maximum number of supported UBI devices */
36 /* UBI name used for character devices, sysfs, etc */
37 #define UBI_NAME_STR "ubi"
41 /* Normal UBI messages */
43 void ubi_msg(const struct ubi_device *ubi, const char *fmt, ...);
45 /* UBI warning messages */
47 void ubi_warn(const struct ubi_device *ubi, const char *fmt, ...);
[all …]
Dubi-media.h1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
10 * 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!") */
34 * Volume type constants used in the volume identifier header.
36 * @UBI_VID_DYNAMIC: dynamic volume
37 * @UBI_VID_STATIC: static volume
45 * Volume flags used in the volume table record.
47 * @UBI_VTBL_AUTORESIZE_FLG: auto-resize this volume
[all …]
Dupd.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 * Jan 2007: Alexander Schmidt, hacked per-volume update.
12 * This file contains implementation of the volume update and atomic LEB change
15 * The update operation is based on the per-volume update marker which is
16 * stored in the volume table. The update marker is set before the update
18 * interrupted by an unclean re-boot or due to some other reasons, the update
19 * marker stays on the flash media and UBI finds it when it attaches the MTD
20 * device next time. If the update marker is set for a volume, the volume is
25 * transaction with a roll-back capability.
31 #include "ubi.h"
[all …]
Dcdev.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * This file includes implementation of UBI character device operations.
11 * There are two kinds of character devices in UBI: UBI character devices and
12 * UBI volume character devices. UBI character devices allow users to
13 * manipulate whole volumes: create, remove, and re-size them. Volume character
14 * devices provide volume I/O capabilities.
16 * Major and minor numbers are assigned dynamically to both UBI and volume
19 * Well, there is the third kind of character devices - the UBI control
20 * character device, which allows to manipulate by UBI devices - create and
33 #include <mtd/ubi-user.h>
[all …]
Dattach.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * UBI attaching sub-system.
11 * This sub-system is responsible for attaching MTD devices and it also
16 * objects which are kept in volume RB-tree with root at the @volumes field.
17 * The RB-tree is indexed by the volume ID.
20 * objects are kept in per-volume RB-trees with the root at the corresponding
21 * &struct ubi_ainf_volume object. To put it differently, we keep an RB-tree of
22 * per-volume objects and each of these objects is the root of RB-tree of
23 * per-LEB objects.
32 * UBI protects EC and VID headers with CRC-32 checksums, so it can detect
[all …]
Deba.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * The UBI Eraseblock Association (EBA) sub-system.
11 * This sub-system is responsible for I/O to/from logical eraseblock.
17 * The EBA sub-system implements per-logical eraseblock locking. Before
19 * per-logical eraseblock locking is implemented by means of the lock tree. The
20 * lock tree is an RB-tree which refers all the currently locked logical
26 * stored in the volume identifier header. This means that each VID header has
34 #include "ubi.h"
37 * struct ubi_eba_entry - structure encoding a single LEB -> PEB association
40 * This structure is encoding a LEB -> PEB association. Note that the LEB
[all …]
Dgluebi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * This is a small driver which implements fake MTD devices on top of UBI
11 * MTD-oriented software (including all the legacy software) work on top of
12 * UBI.
15 * size (@mtd->writesize) is equivalent to the UBI minimal I/O unit. The
16 * eraseblock size is equivalent to the logical eraseblock size of the volume.
26 #include <linux/mtd/ubi.h>
28 #include "ubi-media.h"
32 current->pid, __func__, ##__VA_ARGS__)
35 * struct gluebi_device - a gluebi device description data structure.
[all …]
Dbuild.c1 // SPDX-License-Identifier: GPL-2.0-or-later
11 * This file includes UBI initialization and building of UBI devices.
13 * When UBI is initialized, it attaches all the MTD devices specified as the
15 * specified, UBI does not attach any MTD device, but it is possible to do
16 * later using the "UBI control device".
33 #include "ubi.h"
38 /* Maximum number of comma-separated items in the 'mtd=' parameter */
51 * struct mtd_dev_param - MTD device parameter description data structure.
54 * @ubi_num: UBI number
57 * @enable_fm: enable fastmap when value is non-zero
[all …]
Ddebug.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 #include "ubi.h"
13 #include <linux/fault-inject.h>
46 * ubi_dump_flash - dump a region of flash. in FAIL_ACTION()
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()
63 if (err && err != -EUCLEAN) { in FAIL_ACTION()
64 ubi_err(ubi, "err %d while reading %d bytes from PEB %d:%d, read %zd bytes", in FAIL_ACTION()
[all …]
Dmisc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 /* Here we keep miscellaneous functions which are used all over the UBI code */
10 #include "ubi.h"
13 * ubi_calc_data_len - calculate how much real data is stored in a buffer.
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()
29 for (i = length - 1; i >= 0; i--) in ubi_calc_data_len()
34 length = ALIGN(i + 1, ubi->min_io_size); in ubi_calc_data_len()
39 * ubi_check_volume - check the contents of a static volume.
[all …]
Dblock.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Driver parameter handling strongly based on drivers/mtd/ubi/build.c
13 * Read-only block devices on top of UBI volumes
16 * UBI volume. The implementation is provided by creating a static 1-to-1
17 * mapping between the block device and the UBI volume.
24 * This feature is compiled in the UBI core, and adds a 'block' parameter
25 * to allow early creation of block devices on top of UBI volumes. Runtime
26 * block creation/removal for UBI volumes is provided through two UBI ioctls:
37 #include <linux/mtd/ubi.h>
39 #include <linux/blk-mq.h>
[all …]
Dio.c1 // SPDX-License-Identifier: GPL-2.0-or-later
10 * UBI input/output sub-system.
12 * This sub-system provides a uniform way to work with all kinds of the
14 * writing UBI headers.
18 * sub-system validates every single header it reads from the flash media.
26 * changed. For example, for different reasons (e.g., optimization) UBI may be
28 * offset. Of course, if the offset of the VID header is unaligned, UBI adds
32 * About minimal I/O units. In general, UBI assumes flash device model where
35 * @ubi->mtd->writesize field. But as an exception, UBI admits use of another
40 * write operations to one NAND page. In this case UBI can fit EC and VID
[all …]
Dfastmap.c1 // SPDX-License-Identifier: GPL-2.0-only
10 #include "ubi.h"
13 * init_seen - allocate memory for used for debugging.
14 * @ubi: UBI device description object
16 static inline unsigned long *init_seen(struct ubi_device *ubi) in init_seen() argument
20 if (!ubi_dbg_chk_fastmap(ubi)) in init_seen()
23 ret = bitmap_zalloc(ubi->peb_count, GFP_NOFS); in init_seen()
25 return ERR_PTR(-ENOMEM); in init_seen()
31 * free_seen - free the seen logic integer array.
32 * @seen: integer array of @ubi->peb_count size
[all …]
Dwl.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * UBI wear-leveling sub-system.
11 * This sub-system is responsible for wear-leveling. It works in terms of
13 * eraseblocks, volumes, etc. From this sub-system's perspective all physical
14 * eraseblocks are of two types - used and free. Used physical eraseblocks are
21 * When physical eraseblocks are returned to the WL sub-system by means of the
23 * done asynchronously in context of the per-UBI device background thread,
24 * which is also managed by the WL sub-system.
26 * The wear-leveling is ensured by means of moving the contents of used
30 * If the WL sub-system fails to erase a physical eraseblock, it marks it as
[all …]
/linux-6.12.1/Documentation/ABI/stable/
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
20 future backward-compatible (but forward-incompatible)
29 UBI devices (UBI device 0, 1, etc). They contain general UBI
30 device information and per UBI volume information (each UBI
[all …]
/linux-6.12.1/include/uapi/mtd/
Dubi-user.h1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 * UBI device creation (the same as MTD device attachment)
31 * MTD devices may be attached using %UBI_IOCATT ioctl command of the UBI
33 * &struct ubi_attach_req object - UBI will attach the MTD device specified in
34 * the request and return the newly created UBI device number as the ioctl
37 * UBI device deletion (the same as MTD device detachment)
40 * An UBI device maybe deleted with %UBI_IOCDET ioctl command of the UBI
43 * UBI volume creation
46 * UBI volumes are created via the %UBI_IOCMKVOL ioctl command of UBI character
[all …]
/linux-6.12.1/include/linux/mtd/
Dubi.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
14 #include <mtd/ubi-user.h>
17 #define UBI_ALL -1
26 * enum ubi_open_mode - UBI volume open mode constants.
28 * UBI_READONLY: read-only mode
29 * UBI_READWRITE: read-write mode
31 * UBI_METAONLY: modify only the volume meta-data,
32 * i.e. the data stored in the volume table, but not in any of volume LEBs.
42 * struct ubi_volume_info - UBI volume description data structure.
43 * @vol_id: volume ID
[all …]
/linux-6.12.1/Documentation/filesystems/
Dubifs.rst1 .. SPDX-License-Identifier: GPL-2.0
4 UBI File System
10 UBIFS file-system stands for UBI File System. UBI stands for "Unsorted
13 is completely different to any traditional file-system in Linux, like
14 Ext2, XFS, JFS, etc. UBIFS represents a separate class of file-systems
16 file-system of this class is JFFS2.
24 2 MTD devices support 3 main operations - read from some offset within an
26 eraseblock. Block devices support 2 main operations - read a whole
29 re-write its contents. Blocks may be just re-written.
30 4 Eraseblocks become worn out after some number of erase cycles -
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/mtd/partitions/
Dlinux,ubi.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/mtd/partitions/linux,ubi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 UBI ("Unsorted Block Images") is a volume management system for raw
12 physical flash device and spreads the I/O load (i.e wear-leveling)
16 - Daniel Golle <daniel@makrotopia.org>
19 - $ref: partition.yaml#
23 const: linux,ubi
27 description: UBI Volumes
[all …]
Dubi-volume.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/mtd/partitions/ubi-volume.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: UBI volume
10 This binding describes a single UBI volume. Volumes can be matches either
14 - Daniel Golle <daniel@makrotopia.org>
20 Match UBI volume ID
25 Match UBI volume ID
27 nvmem-layout:
[all …]
/linux-6.12.1/fs/ubifs/
Dsuper.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2006-2008 Nokia Corporation.
35 return -EINVAL; in ubifs_default_version_set()
60 * validate_inode - validate inode.
61 * @c: UBIFS file-system description object
67 * a non-zero error code if not.
74 if (inode->i_size > c->max_inode_sz) { in validate_inode()
76 (long long)inode->i_size); in validate_inode()
80 if (ui->compr_type >= UBIFS_COMPR_TYPES_CNT) { in validate_inode()
81 ubifs_err(c, "unknown compression type %d", ui->compr_type); in validate_inode()
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/nvmem/layouts/
Du-boot,env.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/nvmem/layouts/u-boot,env.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: U-Boot environment variables layout
10 U-Boot uses environment variables to store device parameters and
14 Data is stored using U-Boot specific formats (variant specific header and NUL
15 separated key-value pairs).
19 2. UBI volume
27 - Rafał Miłecki <rafal@milecki.pl>
[all …]

12