Lines Matching +full:out +full:- +full:volume +full:- +full:limit

1 /* 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
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
48 * @UBI_VTBL_SKIP_CRC_CHECK_FLG: skip the CRC check done on a static volume at
51 * check. Main use-case for this flag is
52 * boot-time reduction
54 * %UBI_VTBL_AUTORESIZE_FLG flag can be set only for one volume in the volume
55 * table. UBI automatically re-sizes the volume which has this flag and makes
56 * the volume to be of largest possible size. This means that if after the
57 * initialization UBI finds out that there are available physical eraseblocks
58 * present on the device, it automatically appends all of them to the volume
60 * reserved physical eraseblocks are not taken). So, if there is a volume with
63 * reserved for this volume. Note, the %UBI_VTBL_AUTORESIZE_FLG bit is cleared
64 * after the volume had been initialized.
66 * The auto-resize feature is useful for device production purposes. For
73 * number is required to calculate the volume sized and put them to the volume
75 * which will store the root file system) is marked as "auto-resizable", and
79 * eraseblock handling, and then re-sizes the volume, not vice-versa. This
90 * @UBI_COMPAT_DELETE: delete this internal volume before anything is written
92 * @UBI_COMPAT_RO: attach this device in read-only mode
93 * @UBI_COMPAT_PRESERVE: preserve this internal volume - do not touch its
94 * physical eraseblocks, don't allow the wear-leveling
95 * sub-system to move them
110 #define UBI_EC_HDR_SIZE_CRC (UBI_EC_HDR_SIZE - sizeof(__be32))
111 #define UBI_VID_HDR_SIZE_CRC (UBI_VID_HDR_SIZE - sizeof(__be32))
114 * struct ubi_ec_hdr - UBI erase counter header.
131 * is changed radically. This field is duplicated in the volume identifier
135 * volume identifier header and user data, relative to the beginning of the
151 __be64 ec; /* Warning: the current limit is 31-bit anyway! */
160 * struct ubi_vid_hdr - on-flash UBI volume identifier header.
161 * @magic: volume identifier header magic number (%UBI_VID_HDR_MAGIC)
164 * @vol_type: volume type (%UBI_VID_DYNAMIC or %UBI_VID_STATIC)
166 * eraseblock (for wear-leveling reasons)
167 * @compat: compatibility of this volume (%0, %UBI_COMPAT_DELETE,
169 * @vol_id: ID of this volume
173 * @used_ebs: total number of used logical eraseblocks in this volume
180 * @hdr_crc: volume identifier header CRC checksum
186 * unsigned 64-bit integer and we assume it never overflows. The @sqnum
192 * and @lnum values in the volume identifier header. Suppose we have a logical
198 * so P1 is written to, then an unclean reboot happens. Result - there are 2
204 * eraseblocks for wear-leveling reasons. If, for example, UBI moves L from P
229 * UBI purposes. In this implementation there is only one internal volume - the
230 * layout volume. Internal volumes are the main mechanism of UBI extensions.
231 * For example, in future one may introduce a journal internal volume. Internal
239 * journal volume. And in this case, older UBI binaries, which know nothing
240 * about the journal volume, would just delete this volume and work perfectly
242 * - it just ignores the Ext3fs journal.
245 * eraseblock if this is a static volume. In case of dynamic volumes, it does
247 * data of the physical eraseblock was moved by the wear-leveling sub-system,
248 * then the wear-leveling sub-system calculates the data CRC and stores it in
255 * wear-leveling reasons. In this case, UBI calculates CRC checksum of the
260 * eraseblocks the data of the volume takes. For dynamic volumes this field is
265 * eraseblocks of this volume. This is very handy when one uses block-oriented
266 * software (say, cramfs) on top of the UBI volume.
294 #define UBI_INTERNAL_VOL_START (0x7FFFFFFF - 4096)
296 /* The layout volume contains the volume table */
302 #define UBI_LAYOUT_VOLUME_NAME "layout volume"
308 /* The maximum volume name length */
311 /* Size of the volume table record */
314 /* Size of the volume table record without the ending CRC */
315 #define UBI_VTBL_RECORD_SIZE_CRC (UBI_VTBL_RECORD_SIZE - sizeof(__be32))
318 * struct ubi_vtbl_record - a record in the volume table.
319 * @reserved_pebs: how many physical eraseblocks are reserved for this volume
320 * @alignment: volume alignment
323 * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME)
324 * @upd_marker: if volume update was started but not finished
325 * @name_len: volume name length
326 * @name: the volume name
327 * @flags: volume flags (%UBI_VTBL_AUTORESIZE_FLG)
331 * The volume table records are stored in the volume table, which is stored in
332 * the layout volume. The layout volume consists of 2 logical eraseblock, each
333 * of which contains a copy of the volume table (i.e., the volume table is
334 * duplicated). The volume table is an array of &struct ubi_vtbl_record
335 * objects indexed by the volume ID.
338 * %UBI_MAX_VOLUMES records, the volume table contains %UBI_MAX_VOLUMES
342 * The @upd_marker flag is used to implement volume update. It is set to %1
344 * interrupted, UBI knows that the volume is corrupted.
346 * The @alignment field is specified when the volume is created and cannot be
347 * later changed. It may be useful, for example, when a block-oriented file
368 /* UBI fastmap on-flash data structures */
373 /* fastmap on-flash data structure format version */
397 * struct ubi_fm_sb - UBI fastmap super block
420 * struct ubi_fm_hdr - header of the fastmap data set
443 * struct ubi_fm_scan_pool - Fastmap pool PEBs to be scanned while attaching
460 * struct ubi_fm_ec - stores the erase counter of a PEB
470 * struct ubi_fm_volhdr - Fastmap volume header
472 * @magic: Fastmap volume header magic number (%UBI_FM_VHDR_MAGIC)
473 * @vol_id: volume id of the fastmapped volume
474 * @vol_type: type of the fastmapped volume
475 * @data_pad: data_pad value of the fastmapped volume
476 * @used_ebs: number of used LEBs within this volume
493 * struct ubi_fm_eba - denotes an association between a PEB and LEB