1f4988927SArtem BityutskiyWhat:		/sys/class/ubi/
2f4988927SArtem BityutskiyDate:		July 2006
3f4988927SArtem BityutskiyKernelVersion:	2.6.22
4f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
5f4988927SArtem BityutskiyDescription:
6f4988927SArtem Bityutskiy		The ubi/ class sub-directory belongs to the UBI subsystem and
7f4988927SArtem Bityutskiy		provides general UBI information, per-UBI device information
8f4988927SArtem Bityutskiy		and per-UBI volume information.
9f4988927SArtem Bityutskiy
10f4988927SArtem BityutskiyWhat:		/sys/class/ubi/version
11f4988927SArtem BityutskiyDate:		July 2006
12f4988927SArtem BityutskiyKernelVersion:	2.6.22
13f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
14f4988927SArtem BityutskiyDescription:
15f4988927SArtem Bityutskiy		This file contains version of the latest supported UBI on-media
16f4988927SArtem Bityutskiy		format. Currently it is 1, and there is no plan to change this.
17f4988927SArtem Bityutskiy		However, if in the future UBI needs on-flash format changes
18f4988927SArtem Bityutskiy		which cannot be done in a compatible manner, a new format
19f4988927SArtem Bityutskiy		version will be added. So this is a mechanism for possible
20f4988927SArtem Bityutskiy		future backward-compatible (but forward-incompatible)
21f4988927SArtem Bityutskiy		improvements.
22f4988927SArtem Bityutskiy
23f4988927SArtem BityutskiyWhat:		/sys/class/ubiX/
24f4988927SArtem BityutskiyDate:		July 2006
25f4988927SArtem BityutskiyKernelVersion:	2.6.22
26f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
27f4988927SArtem BityutskiyDescription:
28f4988927SArtem Bityutskiy		The /sys/class/ubi0, /sys/class/ubi1, etc directories describe
29f4988927SArtem Bityutskiy		UBI devices (UBI device 0, 1, etc). They contain general UBI
30f4988927SArtem Bityutskiy		device information and per UBI volume information (each UBI
31f4988927SArtem Bityutskiy		device may have many UBI volumes)
32f4988927SArtem Bityutskiy
33f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/avail_eraseblocks
34f4988927SArtem BityutskiyDate:		July 2006
35f4988927SArtem BityutskiyKernelVersion:	2.6.22
36f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
37f4988927SArtem BityutskiyDescription:
38f4988927SArtem Bityutskiy		Amount of available logical eraseblock. For example, one may
39f4988927SArtem Bityutskiy		create a new UBI volume which has this amount of logical
40f4988927SArtem Bityutskiy		eraseblocks.
41f4988927SArtem Bityutskiy
42f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/bad_peb_count
43f4988927SArtem BityutskiyDate:		July 2006
44f4988927SArtem BityutskiyKernelVersion:	2.6.22
45f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
46f4988927SArtem BityutskiyDescription:
47f4988927SArtem Bityutskiy		Count of bad physical eraseblocks on the underlying MTD device.
48f4988927SArtem Bityutskiy
49f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/bgt_enabled
50f4988927SArtem BityutskiyDate:		July 2006
51f4988927SArtem BityutskiyKernelVersion:	2.6.22
52f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
53f4988927SArtem BityutskiyDescription:
54f4988927SArtem Bityutskiy		Contains ASCII "0\n" if the UBI background thread is disabled,
55f4988927SArtem Bityutskiy		and ASCII "1\n" if it is enabled.
56f4988927SArtem Bityutskiy
57f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/dev
58f4988927SArtem BityutskiyDate:		July 2006
59f4988927SArtem BityutskiyKernelVersion:	2.6.22
60f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
61f4988927SArtem BityutskiyDescription:
62f4988927SArtem Bityutskiy		Major and minor numbers of the character device corresponding
63f4988927SArtem Bityutskiy		to this UBI device (in <major>:<minor> format).
64f4988927SArtem Bityutskiy
65f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/eraseblock_size
66f4988927SArtem BityutskiyDate:		July 2006
67f4988927SArtem BityutskiyKernelVersion:	2.6.22
68f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
69f4988927SArtem BityutskiyDescription:
70f4988927SArtem Bityutskiy		Maximum logical eraseblock size this UBI device may provide. UBI
71f4988927SArtem Bityutskiy		volumes may have smaller logical eraseblock size because of their
72f4988927SArtem Bityutskiy		alignment.
73f4988927SArtem Bityutskiy
74f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/max_ec
75f4988927SArtem BityutskiyDate:		July 2006
76f4988927SArtem BityutskiyKernelVersion:	2.6.22
77f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
78f4988927SArtem BityutskiyDescription:
79f4988927SArtem Bityutskiy		Maximum physical eraseblock erase counter value.
80f4988927SArtem Bityutskiy
81f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/max_vol_count
82f4988927SArtem BityutskiyDate:		July 2006
83f4988927SArtem BityutskiyKernelVersion:	2.6.22
84f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
85f4988927SArtem BityutskiyDescription:
86f4988927SArtem Bityutskiy		Maximum number of volumes which this UBI device may have.
87f4988927SArtem Bityutskiy
88f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/min_io_size
89f4988927SArtem BityutskiyDate:		July 2006
90f4988927SArtem BityutskiyKernelVersion:	2.6.22
91f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
92f4988927SArtem BityutskiyDescription:
93f4988927SArtem Bityutskiy		Minimum input/output unit size. All the I/O may only be done
94f4988927SArtem Bityutskiy		in fractions of the contained number.
95f4988927SArtem Bityutskiy
96f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/mtd_num
97f4988927SArtem BityutskiyDate:		January 2008
98f4988927SArtem BityutskiyKernelVersion:	2.6.25
99f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
100f4988927SArtem BityutskiyDescription:
101f4988927SArtem Bityutskiy		Number of the underlying MTD device.
102f4988927SArtem Bityutskiy
103f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/reserved_for_bad
104f4988927SArtem BityutskiyDate:		July 2006
105f4988927SArtem BityutskiyKernelVersion:	2.6.22
106f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
107f4988927SArtem BityutskiyDescription:
108f4988927SArtem Bityutskiy		Number of physical eraseblocks reserved for bad block handling.
109f4988927SArtem Bityutskiy
110525bab71SEzequiel GarciaWhat:		/sys/class/ubi/ubiX/ro_mode
111525bab71SEzequiel GarciaDate:		April 2016
112525bab71SEzequiel GarciaKernelVersion:	4.7
113525bab71SEzequiel GarciaContact:	linux-mtd@lists.infradead.org
114525bab71SEzequiel GarciaDescription:
115525bab71SEzequiel Garcia		Contains ASCII "1\n" if the read-only flag is set on this
116525bab71SEzequiel Garcia		device, and "0\n" if it is cleared. UBI devices mark themselves
117525bab71SEzequiel Garcia		as read-only when they detect an unrecoverable error.
118525bab71SEzequiel Garcia
119f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/total_eraseblocks
120f4988927SArtem BityutskiyDate:		July 2006
121f4988927SArtem BityutskiyKernelVersion:	2.6.22
122f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
123f4988927SArtem BityutskiyDescription:
124f4988927SArtem Bityutskiy		Total number of good (not marked as bad) physical eraseblocks on
125f4988927SArtem Bityutskiy		the underlying MTD device.
126f4988927SArtem Bityutskiy
127f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/volumes_count
128f4988927SArtem BityutskiyDate:		July 2006
129f4988927SArtem BityutskiyKernelVersion:	2.6.22
130f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
131f4988927SArtem BityutskiyDescription:
132f4988927SArtem Bityutskiy		Count of volumes on this UBI device.
133f4988927SArtem Bityutskiy
134f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/
135f4988927SArtem BityutskiyDate:		July 2006
136f4988927SArtem BityutskiyKernelVersion:	2.6.22
137f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
138f4988927SArtem BityutskiyDescription:
139f4988927SArtem Bityutskiy		The /sys/class/ubi/ubiX/ubiX_0/, /sys/class/ubi/ubiX/ubiX_1/,
140f4988927SArtem Bityutskiy		etc directories describe UBI volumes on UBI device X (volumes
141f4988927SArtem Bityutskiy		0, 1, etc).
142f4988927SArtem Bityutskiy
143f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/alignment
144f4988927SArtem BityutskiyDate:		July 2006
145f4988927SArtem BityutskiyKernelVersion:	2.6.22
146f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
147f4988927SArtem BityutskiyDescription:
148f4988927SArtem Bityutskiy		Volume alignment - the value the logical eraseblock size of
149f4988927SArtem Bityutskiy		this volume has to be aligned on. For example, 2048 means that
150f4988927SArtem Bityutskiy		logical eraseblock size is multiple of 2048. In other words,
151f4988927SArtem Bityutskiy		volume logical eraseblock size is UBI device logical eraseblock
152f4988927SArtem Bityutskiy		size aligned to the alignment value.
153f4988927SArtem Bityutskiy
154f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/corrupted
155f4988927SArtem BityutskiyDate:		July 2006
156f4988927SArtem BityutskiyKernelVersion:	2.6.22
157f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
158f4988927SArtem BityutskiyDescription:
159f4988927SArtem Bityutskiy		Contains ASCII "0\n" if the UBI volume is OK, and ASCII "1\n"
160f4988927SArtem Bityutskiy		if it is corrupted (e.g., due to an interrupted volume update).
161f4988927SArtem Bityutskiy
162f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/data_bytes
163f4988927SArtem BityutskiyDate:		July 2006
164f4988927SArtem BityutskiyKernelVersion:	2.6.22
165f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
166f4988927SArtem BityutskiyDescription:
167f4988927SArtem Bityutskiy		The amount of data this volume contains. This value makes sense
168f4988927SArtem Bityutskiy		only for static volumes, and for dynamic volume it equivalent
169f4988927SArtem Bityutskiy		to the total volume size in bytes.
170f4988927SArtem Bityutskiy
171f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/dev
172f4988927SArtem BityutskiyDate:		July 2006
173f4988927SArtem BityutskiyKernelVersion:	2.6.22
174f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
175f4988927SArtem BityutskiyDescription:
176f4988927SArtem Bityutskiy		Major and minor numbers of the character device corresponding
177f4988927SArtem Bityutskiy		to this UBI volume (in <major>:<minor> format).
178f4988927SArtem Bityutskiy
179f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/name
180f4988927SArtem BityutskiyDate:		July 2006
181f4988927SArtem BityutskiyKernelVersion:	2.6.22
182f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
183f4988927SArtem BityutskiyDescription:
184f4988927SArtem Bityutskiy		Volume name.
185f4988927SArtem Bityutskiy
186f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/reserved_ebs
187f4988927SArtem BityutskiyDate:		July 2006
188f4988927SArtem BityutskiyKernelVersion:	2.6.22
189f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
190f4988927SArtem BityutskiyDescription:
191f4988927SArtem Bityutskiy		Count of physical eraseblock reserved for this volume.
192f4988927SArtem Bityutskiy		Equivalent to the volume size in logical eraseblocks.
193f4988927SArtem Bityutskiy
194f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/type
195f4988927SArtem BityutskiyDate:		July 2006
196f4988927SArtem BityutskiyKernelVersion:	2.6.22
197f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
198f4988927SArtem BityutskiyDescription:
199f4988927SArtem Bityutskiy		Volume type. Contains ASCII "dynamic\n" for dynamic volumes and
200f4988927SArtem Bityutskiy		"static\n" for static volumes.
201f4988927SArtem Bityutskiy
202f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/upd_marker
203f4988927SArtem BityutskiyDate:		July 2006
204f4988927SArtem BityutskiyKernelVersion:	2.6.22
205f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
206f4988927SArtem BityutskiyDescription:
207f4988927SArtem Bityutskiy		Contains ASCII "0\n" if the update marker is not set for this
208f4988927SArtem Bityutskiy		volume, and "1\n" if it is set. The update marker is set when
209f4988927SArtem Bityutskiy		volume update starts, and cleaned when it ends. So the presence
210f4988927SArtem Bityutskiy		of the update marker indicates that the volume is being updated
211f4988927SArtem Bityutskiy		at the moment of the update was interrupted. The later may be
212f4988927SArtem Bityutskiy		checked using the "corrupted" sysfs file.
213f4988927SArtem Bityutskiy
214f4988927SArtem BityutskiyWhat:		/sys/class/ubi/ubiX/ubiX_Y/usable_eb_size
215f4988927SArtem BityutskiyDate:		July 2006
216f4988927SArtem BityutskiyKernelVersion:	2.6.22
217f4988927SArtem BityutskiyContact:	Artem Bityutskiy <dedekind@infradead.org>
218f4988927SArtem BityutskiyDescription:
219f4988927SArtem Bityutskiy		Logical eraseblock size of this volume. Equivalent to logical
220f4988927SArtem Bityutskiy		eraseblock size of the device aligned on the volume alignment
221f4988927SArtem Bityutskiy		value.
222