162306a36Sopenharmony_ciWhat:		/sys/class/ubi/
262306a36Sopenharmony_ciDate:		July 2006
362306a36Sopenharmony_ciKernelVersion:	2.6.22
462306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
562306a36Sopenharmony_ciDescription:
662306a36Sopenharmony_ci		The ubi/ class sub-directory belongs to the UBI subsystem and
762306a36Sopenharmony_ci		provides general UBI information, per-UBI device information
862306a36Sopenharmony_ci		and per-UBI volume information.
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciWhat:		/sys/class/ubi/version
1162306a36Sopenharmony_ciDate:		July 2006
1262306a36Sopenharmony_ciKernelVersion:	2.6.22
1362306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1462306a36Sopenharmony_ciDescription:
1562306a36Sopenharmony_ci		This file contains version of the latest supported UBI on-media
1662306a36Sopenharmony_ci		format. Currently it is 1, and there is no plan to change this.
1762306a36Sopenharmony_ci		However, if in the future UBI needs on-flash format changes
1862306a36Sopenharmony_ci		which cannot be done in a compatible manner, a new format
1962306a36Sopenharmony_ci		version will be added. So this is a mechanism for possible
2062306a36Sopenharmony_ci		future backward-compatible (but forward-incompatible)
2162306a36Sopenharmony_ci		improvements.
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciWhat:		/sys/class/ubiX/
2462306a36Sopenharmony_ciDate:		July 2006
2562306a36Sopenharmony_ciKernelVersion:	2.6.22
2662306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
2762306a36Sopenharmony_ciDescription:
2862306a36Sopenharmony_ci		The /sys/class/ubi0, /sys/class/ubi1, etc directories describe
2962306a36Sopenharmony_ci		UBI devices (UBI device 0, 1, etc). They contain general UBI
3062306a36Sopenharmony_ci		device information and per UBI volume information (each UBI
3162306a36Sopenharmony_ci		device may have many UBI volumes)
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/avail_eraseblocks
3462306a36Sopenharmony_ciDate:		July 2006
3562306a36Sopenharmony_ciKernelVersion:	2.6.22
3662306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
3762306a36Sopenharmony_ciDescription:
3862306a36Sopenharmony_ci		Amount of available logical eraseblock. For example, one may
3962306a36Sopenharmony_ci		create a new UBI volume which has this amount of logical
4062306a36Sopenharmony_ci		eraseblocks.
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/bad_peb_count
4362306a36Sopenharmony_ciDate:		July 2006
4462306a36Sopenharmony_ciKernelVersion:	2.6.22
4562306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
4662306a36Sopenharmony_ciDescription:
4762306a36Sopenharmony_ci		Count of bad physical eraseblocks on the underlying MTD device.
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/bgt_enabled
5062306a36Sopenharmony_ciDate:		July 2006
5162306a36Sopenharmony_ciKernelVersion:	2.6.22
5262306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
5362306a36Sopenharmony_ciDescription:
5462306a36Sopenharmony_ci		Contains ASCII "0\n" if the UBI background thread is disabled,
5562306a36Sopenharmony_ci		and ASCII "1\n" if it is enabled.
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/dev
5862306a36Sopenharmony_ciDate:		July 2006
5962306a36Sopenharmony_ciKernelVersion:	2.6.22
6062306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
6162306a36Sopenharmony_ciDescription:
6262306a36Sopenharmony_ci		Major and minor numbers of the character device corresponding
6362306a36Sopenharmony_ci		to this UBI device (in <major>:<minor> format).
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/eraseblock_size
6662306a36Sopenharmony_ciDate:		July 2006
6762306a36Sopenharmony_ciKernelVersion:	2.6.22
6862306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
6962306a36Sopenharmony_ciDescription:
7062306a36Sopenharmony_ci		Maximum logical eraseblock size this UBI device may provide. UBI
7162306a36Sopenharmony_ci		volumes may have smaller logical eraseblock size because of their
7262306a36Sopenharmony_ci		alignment.
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/max_ec
7562306a36Sopenharmony_ciDate:		July 2006
7662306a36Sopenharmony_ciKernelVersion:	2.6.22
7762306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
7862306a36Sopenharmony_ciDescription:
7962306a36Sopenharmony_ci		Maximum physical eraseblock erase counter value.
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/max_vol_count
8262306a36Sopenharmony_ciDate:		July 2006
8362306a36Sopenharmony_ciKernelVersion:	2.6.22
8462306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
8562306a36Sopenharmony_ciDescription:
8662306a36Sopenharmony_ci		Maximum number of volumes which this UBI device may have.
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/min_io_size
8962306a36Sopenharmony_ciDate:		July 2006
9062306a36Sopenharmony_ciKernelVersion:	2.6.22
9162306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
9262306a36Sopenharmony_ciDescription:
9362306a36Sopenharmony_ci		Minimum input/output unit size. All the I/O may only be done
9462306a36Sopenharmony_ci		in fractions of the contained number.
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/mtd_num
9762306a36Sopenharmony_ciDate:		January 2008
9862306a36Sopenharmony_ciKernelVersion:	2.6.25
9962306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
10062306a36Sopenharmony_ciDescription:
10162306a36Sopenharmony_ci		Number of the underlying MTD device.
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/reserved_for_bad
10462306a36Sopenharmony_ciDate:		July 2006
10562306a36Sopenharmony_ciKernelVersion:	2.6.22
10662306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
10762306a36Sopenharmony_ciDescription:
10862306a36Sopenharmony_ci		Number of physical eraseblocks reserved for bad block handling.
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ro_mode
11162306a36Sopenharmony_ciDate:		April 2016
11262306a36Sopenharmony_ciKernelVersion:	4.7
11362306a36Sopenharmony_ciContact:	linux-mtd@lists.infradead.org
11462306a36Sopenharmony_ciDescription:
11562306a36Sopenharmony_ci		Contains ASCII "1\n" if the read-only flag is set on this
11662306a36Sopenharmony_ci		device, and "0\n" if it is cleared. UBI devices mark themselves
11762306a36Sopenharmony_ci		as read-only when they detect an unrecoverable error.
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/total_eraseblocks
12062306a36Sopenharmony_ciDate:		July 2006
12162306a36Sopenharmony_ciKernelVersion:	2.6.22
12262306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
12362306a36Sopenharmony_ciDescription:
12462306a36Sopenharmony_ci		Total number of good (not marked as bad) physical eraseblocks on
12562306a36Sopenharmony_ci		the underlying MTD device.
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/volumes_count
12862306a36Sopenharmony_ciDate:		July 2006
12962306a36Sopenharmony_ciKernelVersion:	2.6.22
13062306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
13162306a36Sopenharmony_ciDescription:
13262306a36Sopenharmony_ci		Count of volumes on this UBI device.
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/
13562306a36Sopenharmony_ciDate:		July 2006
13662306a36Sopenharmony_ciKernelVersion:	2.6.22
13762306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
13862306a36Sopenharmony_ciDescription:
13962306a36Sopenharmony_ci		The /sys/class/ubi/ubiX/ubiX_0/, /sys/class/ubi/ubiX/ubiX_1/,
14062306a36Sopenharmony_ci		etc directories describe UBI volumes on UBI device X (volumes
14162306a36Sopenharmony_ci		0, 1, etc).
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/alignment
14462306a36Sopenharmony_ciDate:		July 2006
14562306a36Sopenharmony_ciKernelVersion:	2.6.22
14662306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
14762306a36Sopenharmony_ciDescription:
14862306a36Sopenharmony_ci		Volume alignment - the value the logical eraseblock size of
14962306a36Sopenharmony_ci		this volume has to be aligned on. For example, 2048 means that
15062306a36Sopenharmony_ci		logical eraseblock size is multiple of 2048. In other words,
15162306a36Sopenharmony_ci		volume logical eraseblock size is UBI device logical eraseblock
15262306a36Sopenharmony_ci		size aligned to the alignment value.
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/corrupted
15562306a36Sopenharmony_ciDate:		July 2006
15662306a36Sopenharmony_ciKernelVersion:	2.6.22
15762306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
15862306a36Sopenharmony_ciDescription:
15962306a36Sopenharmony_ci		Contains ASCII "0\n" if the UBI volume is OK, and ASCII "1\n"
16062306a36Sopenharmony_ci		if it is corrupted (e.g., due to an interrupted volume update).
16162306a36Sopenharmony_ci
16262306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/data_bytes
16362306a36Sopenharmony_ciDate:		July 2006
16462306a36Sopenharmony_ciKernelVersion:	2.6.22
16562306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
16662306a36Sopenharmony_ciDescription:
16762306a36Sopenharmony_ci		The amount of data this volume contains. This value makes sense
16862306a36Sopenharmony_ci		only for static volumes, and for dynamic volume it equivalent
16962306a36Sopenharmony_ci		to the total volume size in bytes.
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/dev
17262306a36Sopenharmony_ciDate:		July 2006
17362306a36Sopenharmony_ciKernelVersion:	2.6.22
17462306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
17562306a36Sopenharmony_ciDescription:
17662306a36Sopenharmony_ci		Major and minor numbers of the character device corresponding
17762306a36Sopenharmony_ci		to this UBI volume (in <major>:<minor> format).
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/name
18062306a36Sopenharmony_ciDate:		July 2006
18162306a36Sopenharmony_ciKernelVersion:	2.6.22
18262306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
18362306a36Sopenharmony_ciDescription:
18462306a36Sopenharmony_ci		Volume name.
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/reserved_ebs
18762306a36Sopenharmony_ciDate:		July 2006
18862306a36Sopenharmony_ciKernelVersion:	2.6.22
18962306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
19062306a36Sopenharmony_ciDescription:
19162306a36Sopenharmony_ci		Count of physical eraseblock reserved for this volume.
19262306a36Sopenharmony_ci		Equivalent to the volume size in logical eraseblocks.
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/type
19562306a36Sopenharmony_ciDate:		July 2006
19662306a36Sopenharmony_ciKernelVersion:	2.6.22
19762306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
19862306a36Sopenharmony_ciDescription:
19962306a36Sopenharmony_ci		Volume type. Contains ASCII "dynamic\n" for dynamic volumes and
20062306a36Sopenharmony_ci		"static\n" for static volumes.
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/upd_marker
20362306a36Sopenharmony_ciDate:		July 2006
20462306a36Sopenharmony_ciKernelVersion:	2.6.22
20562306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
20662306a36Sopenharmony_ciDescription:
20762306a36Sopenharmony_ci		Contains ASCII "0\n" if the update marker is not set for this
20862306a36Sopenharmony_ci		volume, and "1\n" if it is set. The update marker is set when
20962306a36Sopenharmony_ci		volume update starts, and cleaned when it ends. So the presence
21062306a36Sopenharmony_ci		of the update marker indicates that the volume is being updated
21162306a36Sopenharmony_ci		at the moment of the update was interrupted. The later may be
21262306a36Sopenharmony_ci		checked using the "corrupted" sysfs file.
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/usable_eb_size
21562306a36Sopenharmony_ciDate:		July 2006
21662306a36Sopenharmony_ciKernelVersion:	2.6.22
21762306a36Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
21862306a36Sopenharmony_ciDescription:
21962306a36Sopenharmony_ci		Logical eraseblock size of this volume. Equivalent to logical
22062306a36Sopenharmony_ci		eraseblock size of the device aligned on the volume alignment
22162306a36Sopenharmony_ci		value.
222