18c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/
28c2ecf20Sopenharmony_ciDate:		July 2006
38c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
48c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
58c2ecf20Sopenharmony_ciDescription:
68c2ecf20Sopenharmony_ci		The ubi/ class sub-directory belongs to the UBI subsystem and
78c2ecf20Sopenharmony_ci		provides general UBI information, per-UBI device information
88c2ecf20Sopenharmony_ci		and per-UBI volume information.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/version
118c2ecf20Sopenharmony_ciDate:		July 2006
128c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
138c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
148c2ecf20Sopenharmony_ciDescription:
158c2ecf20Sopenharmony_ci		This file contains version of the latest supported UBI on-media
168c2ecf20Sopenharmony_ci		format. Currently it is 1, and there is no plan to change this.
178c2ecf20Sopenharmony_ci		However, if in the future UBI needs on-flash format changes
188c2ecf20Sopenharmony_ci		which cannot be done in a compatible manner, a new format
198c2ecf20Sopenharmony_ci		version will be added. So this is a mechanism for possible
208c2ecf20Sopenharmony_ci		future backward-compatible (but forward-incompatible)
218c2ecf20Sopenharmony_ci		improvements.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciWhat:		/sys/class/ubiX/
248c2ecf20Sopenharmony_ciDate:		July 2006
258c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
268c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
278c2ecf20Sopenharmony_ciDescription:
288c2ecf20Sopenharmony_ci		The /sys/class/ubi0, /sys/class/ubi1, etc directories describe
298c2ecf20Sopenharmony_ci		UBI devices (UBI device 0, 1, etc). They contain general UBI
308c2ecf20Sopenharmony_ci		device information and per UBI volume information (each UBI
318c2ecf20Sopenharmony_ci		device may have many UBI volumes)
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/avail_eraseblocks
348c2ecf20Sopenharmony_ciDate:		July 2006
358c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
368c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
378c2ecf20Sopenharmony_ciDescription:
388c2ecf20Sopenharmony_ci		Amount of available logical eraseblock. For example, one may
398c2ecf20Sopenharmony_ci		create a new UBI volume which has this amount of logical
408c2ecf20Sopenharmony_ci		eraseblocks.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/bad_peb_count
438c2ecf20Sopenharmony_ciDate:		July 2006
448c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
458c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
468c2ecf20Sopenharmony_ciDescription:
478c2ecf20Sopenharmony_ci		Count of bad physical eraseblocks on the underlying MTD device.
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/bgt_enabled
508c2ecf20Sopenharmony_ciDate:		July 2006
518c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
528c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
538c2ecf20Sopenharmony_ciDescription:
548c2ecf20Sopenharmony_ci		Contains ASCII "0\n" if the UBI background thread is disabled,
558c2ecf20Sopenharmony_ci		and ASCII "1\n" if it is enabled.
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/dev
588c2ecf20Sopenharmony_ciDate:		July 2006
598c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
608c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
618c2ecf20Sopenharmony_ciDescription:
628c2ecf20Sopenharmony_ci		Major and minor numbers of the character device corresponding
638c2ecf20Sopenharmony_ci		to this UBI device (in <major>:<minor> format).
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/eraseblock_size
668c2ecf20Sopenharmony_ciDate:		July 2006
678c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
688c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
698c2ecf20Sopenharmony_ciDescription:
708c2ecf20Sopenharmony_ci		Maximum logical eraseblock size this UBI device may provide. UBI
718c2ecf20Sopenharmony_ci		volumes may have smaller logical eraseblock size because of their
728c2ecf20Sopenharmony_ci		alignment.
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/max_ec
758c2ecf20Sopenharmony_ciDate:		July 2006
768c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
778c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
788c2ecf20Sopenharmony_ciDescription:
798c2ecf20Sopenharmony_ci		Maximum physical eraseblock erase counter value.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/max_vol_count
828c2ecf20Sopenharmony_ciDate:		July 2006
838c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
848c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
858c2ecf20Sopenharmony_ciDescription:
868c2ecf20Sopenharmony_ci		Maximum number of volumes which this UBI device may have.
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/min_io_size
898c2ecf20Sopenharmony_ciDate:		July 2006
908c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
918c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
928c2ecf20Sopenharmony_ciDescription:
938c2ecf20Sopenharmony_ci		Minimum input/output unit size. All the I/O may only be done
948c2ecf20Sopenharmony_ci		in fractions of the contained number.
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/mtd_num
978c2ecf20Sopenharmony_ciDate:		January 2008
988c2ecf20Sopenharmony_ciKernelVersion:	2.6.25
998c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1008c2ecf20Sopenharmony_ciDescription:
1018c2ecf20Sopenharmony_ci		Number of the underlying MTD device.
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/reserved_for_bad
1048c2ecf20Sopenharmony_ciDate:		July 2006
1058c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1068c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1078c2ecf20Sopenharmony_ciDescription:
1088c2ecf20Sopenharmony_ci		Number of physical eraseblocks reserved for bad block handling.
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ro_mode
1118c2ecf20Sopenharmony_ciDate:		April 2016
1128c2ecf20Sopenharmony_ciKernelVersion:	4.7
1138c2ecf20Sopenharmony_ciContact:	linux-mtd@lists.infradead.org
1148c2ecf20Sopenharmony_ciDescription:
1158c2ecf20Sopenharmony_ci		Contains ASCII "1\n" if the read-only flag is set on this
1168c2ecf20Sopenharmony_ci		device, and "0\n" if it is cleared. UBI devices mark themselves
1178c2ecf20Sopenharmony_ci		as read-only when they detect an unrecoverable error.
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/total_eraseblocks
1208c2ecf20Sopenharmony_ciDate:		July 2006
1218c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1228c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1238c2ecf20Sopenharmony_ciDescription:
1248c2ecf20Sopenharmony_ci		Total number of good (not marked as bad) physical eraseblocks on
1258c2ecf20Sopenharmony_ci		the underlying MTD device.
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/volumes_count
1288c2ecf20Sopenharmony_ciDate:		July 2006
1298c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1308c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1318c2ecf20Sopenharmony_ciDescription:
1328c2ecf20Sopenharmony_ci		Count of volumes on this UBI device.
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/
1358c2ecf20Sopenharmony_ciDate:		July 2006
1368c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1378c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1388c2ecf20Sopenharmony_ciDescription:
1398c2ecf20Sopenharmony_ci		The /sys/class/ubi/ubiX/ubiX_0/, /sys/class/ubi/ubiX/ubiX_1/,
1408c2ecf20Sopenharmony_ci		etc directories describe UBI volumes on UBI device X (volumes
1418c2ecf20Sopenharmony_ci		0, 1, etc).
1428c2ecf20Sopenharmony_ci
1438c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/alignment
1448c2ecf20Sopenharmony_ciDate:		July 2006
1458c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1468c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1478c2ecf20Sopenharmony_ciDescription:
1488c2ecf20Sopenharmony_ci		Volume alignment - the value the logical eraseblock size of
1498c2ecf20Sopenharmony_ci		this volume has to be aligned on. For example, 2048 means that
1508c2ecf20Sopenharmony_ci		logical eraseblock size is multiple of 2048. In other words,
1518c2ecf20Sopenharmony_ci		volume logical eraseblock size is UBI device logical eraseblock
1528c2ecf20Sopenharmony_ci		size aligned to the alignment value.
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/corrupted
1558c2ecf20Sopenharmony_ciDate:		July 2006
1568c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1578c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1588c2ecf20Sopenharmony_ciDescription:
1598c2ecf20Sopenharmony_ci		Contains ASCII "0\n" if the UBI volume is OK, and ASCII "1\n"
1608c2ecf20Sopenharmony_ci		if it is corrupted (e.g., due to an interrupted volume update).
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/data_bytes
1638c2ecf20Sopenharmony_ciDate:		July 2006
1648c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1658c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1668c2ecf20Sopenharmony_ciDescription:
1678c2ecf20Sopenharmony_ci		The amount of data this volume contains. This value makes sense
1688c2ecf20Sopenharmony_ci		only for static volumes, and for dynamic volume it equivalent
1698c2ecf20Sopenharmony_ci		to the total volume size in bytes.
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/dev
1728c2ecf20Sopenharmony_ciDate:		July 2006
1738c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1748c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1758c2ecf20Sopenharmony_ciDescription:
1768c2ecf20Sopenharmony_ci		Major and minor numbers of the character device corresponding
1778c2ecf20Sopenharmony_ci		to this UBI volume (in <major>:<minor> format).
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/name
1808c2ecf20Sopenharmony_ciDate:		July 2006
1818c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1828c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1838c2ecf20Sopenharmony_ciDescription:
1848c2ecf20Sopenharmony_ci		Volume name.
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/reserved_ebs
1878c2ecf20Sopenharmony_ciDate:		July 2006
1888c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1898c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1908c2ecf20Sopenharmony_ciDescription:
1918c2ecf20Sopenharmony_ci		Count of physical eraseblock reserved for this volume.
1928c2ecf20Sopenharmony_ci		Equivalent to the volume size in logical eraseblocks.
1938c2ecf20Sopenharmony_ci
1948c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/type
1958c2ecf20Sopenharmony_ciDate:		July 2006
1968c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
1978c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
1988c2ecf20Sopenharmony_ciDescription:
1998c2ecf20Sopenharmony_ci		Volume type. Contains ASCII "dynamic\n" for dynamic volumes and
2008c2ecf20Sopenharmony_ci		"static\n" for static volumes.
2018c2ecf20Sopenharmony_ci
2028c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/upd_marker
2038c2ecf20Sopenharmony_ciDate:		July 2006
2048c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
2058c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
2068c2ecf20Sopenharmony_ciDescription:
2078c2ecf20Sopenharmony_ci		Contains ASCII "0\n" if the update marker is not set for this
2088c2ecf20Sopenharmony_ci		volume, and "1\n" if it is set. The update marker is set when
2098c2ecf20Sopenharmony_ci		volume update starts, and cleaned when it ends. So the presence
2108c2ecf20Sopenharmony_ci		of the update marker indicates that the volume is being updated
2118c2ecf20Sopenharmony_ci		at the moment of the update was interrupted. The later may be
2128c2ecf20Sopenharmony_ci		checked using the "corrupted" sysfs file.
2138c2ecf20Sopenharmony_ci
2148c2ecf20Sopenharmony_ciWhat:		/sys/class/ubi/ubiX/ubiX_Y/usable_eb_size
2158c2ecf20Sopenharmony_ciDate:		July 2006
2168c2ecf20Sopenharmony_ciKernelVersion:	2.6.22
2178c2ecf20Sopenharmony_ciContact:	Artem Bityutskiy <dedekind@infradead.org>
2188c2ecf20Sopenharmony_ciDescription:
2198c2ecf20Sopenharmony_ci		Logical eraseblock size of this volume. Equivalent to logical
2208c2ecf20Sopenharmony_ci		eraseblock size of the device aligned on the volume alignment
2218c2ecf20Sopenharmony_ci		value.
222