• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:volume

1 /* SPDX-License-Identifier: GPL-2.0+ */
13 * This file defines the layout of UBI headers and all the other UBI on-flash
33 /* Volume identifier header magic number (ASCII "UBI!") */
37 * Volume type constants used in the volume identifier header.
39 * @UBI_VID_DYNAMIC: dynamic volume
40 * @UBI_VID_STATIC: static volume
48 * Volume flags used in the volume table record.
50 * @UBI_VTBL_AUTORESIZE_FLG: auto-resize this volume
52 * %UBI_VTBL_AUTORESIZE_FLG flag can be set only for one volume in the volume
53 * table. UBI automatically re-sizes the volume which has this flag and makes
54 * the volume to be of largest possible size. This means that if after the
56 * present on the device, it automatically appends all of them to the volume
58 * reserved physical eraseblocks are not taken). So, if there is a volume with
61 * reserved for this volume. Note, the %UBI_VTBL_AUTORESIZE_FLG bit is cleared
62 * after the volume had been initialized.
64 * The auto-resize feature is useful for device production purposes. For
71 * number is required to calculate the volume sized and put them to the volume
73 * which will store the root file system) is marked as "auto-resizable", and
77 * eraseblock handling, and then re-sizes the volume, not vice-versa. This
87 * @UBI_COMPAT_DELETE: delete this internal volume before anything is written
89 * @UBI_COMPAT_RO: attach this device in read-only mode
90 * @UBI_COMPAT_PRESERVE: preserve this internal volume - do not touch its
91 * physical eraseblocks, don't allow the wear-leveling
92 * sub-system to move them
107 #define UBI_EC_HDR_SIZE_CRC (UBI_EC_HDR_SIZE - sizeof(__be32))
108 #define UBI_VID_HDR_SIZE_CRC (UBI_VID_HDR_SIZE - sizeof(__be32))
111 * struct ubi_ec_hdr - UBI erase counter header.
128 * is changed radically. This field is duplicated in the volume identifier
132 * volume identifier header and user data, relative to the beginning of the
148 __be64 ec; /* Warning: the current limit is 31-bit anyway! */
157 * struct ubi_vid_hdr - on-flash UBI volume identifier header.
158 * @magic: volume identifier header magic number (%UBI_VID_HDR_MAGIC)
161 * @vol_type: volume type (%UBI_VID_DYNAMIC or %UBI_VID_STATIC)
163 * eraseblock (for wear-leveling reasons)
164 * @compat: compatibility of this volume (%0, %UBI_COMPAT_DELETE,
166 * @vol_id: ID of this volume
170 * @used_ebs: total number of used logical eraseblocks in this volume
177 * @hdr_crc: volume identifier header CRC checksum
183 * unsigned 64-bit integer and we assume it never overflows. The @sqnum
189 * and @lnum values in the volume identifier header. Suppose we have a logical
195 * so P1 is written to, then an unclean reboot happens. Result - there are 2
201 * eraseblocks for wear-leveling reasons. If, for example, UBI moves L from P
226 * UBI purposes. In this implementation there is only one internal volume - the
227 * layout volume. Internal volumes are the main mechanism of UBI extensions.
228 * For example, in future one may introduce a journal internal volume. Internal
236 * journal volume. And in this case, older UBI binaries, which know nothing
237 * about the journal volume, would just delete this volume and work perfectly
239 * - it just ignores the Ext3fs journal.
242 * eraseblock if this is a static volume. In case of dynamic volumes, it does
244 * data of the physical eraseblock was moved by the wear-leveling sub-system,
245 * then the wear-leveling sub-system calculates the data CRC and stores it in
252 * wear-leveling reasons. In this case, UBI calculates CRC checksum of the
257 * eraseblocks the data of the volume takes. For dynamic volumes this field is
262 * eraseblocks of this volume. This is very handy when one uses block-oriented
263 * software (say, cramfs) on top of the UBI volume.
291 #define UBI_INTERNAL_VOL_START (0x7FFFFFFF - 4096)
293 /* The layout volume contains the volume table */
299 #define UBI_LAYOUT_VOLUME_NAME "layout volume"
305 /* The maximum volume name length */
308 /* Size of the volume table record */
311 /* Size of the volume table record without the ending CRC */
312 #define UBI_VTBL_RECORD_SIZE_CRC (UBI_VTBL_RECORD_SIZE - sizeof(__be32))
315 * struct ubi_vtbl_record - a record in the volume table.
316 * @reserved_pebs: how many physical eraseblocks are reserved for this volume
317 * @alignment: volume alignment
320 * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME)
321 * @upd_marker: if volume update was started but not finished
322 * @name_len: volume name length
323 * @name: the volume name
324 * @flags: volume flags (%UBI_VTBL_AUTORESIZE_FLG)
328 * The volume table records are stored in the volume table, which is stored in
329 * the layout volume. The layout volume consists of 2 logical eraseblock, each
330 * of which contains a copy of the volume table (i.e., the volume table is
331 * duplicated). The volume table is an array of &struct ubi_vtbl_record
332 * objects indexed by the volume ID.
335 * %UBI_MAX_VOLUMES records, the volume table contains %UBI_MAX_VOLUMES
339 * The @upd_marker flag is used to implement volume update. It is set to %1
341 * interrupted, UBI knows that the volume is corrupted.
343 * The @alignment field is specified when the volume is created and cannot be
344 * later changed. It may be useful, for example, when a block-oriented file
369 /* UBI fastmap on-flash data structures */
374 /* fastmap on-flash data structure format version */
398 * struct ubi_fm_sb - UBI fastmap super block
421 * struct ubi_fm_hdr - header of the fastmap data set
444 * struct ubi_fm_scan_pool - Fastmap pool PEBs to be scanned while attaching
461 * struct ubi_fm_ec - stores the erase counter of a PEB
471 * struct ubi_fm_volhdr - Fastmap volume header
473 * @magic: Fastmap volume header magic number (%UBI_FM_VHDR_MAGIC)
474 * @vol_id: volume id of the fastmapped volume
475 * @vol_type: type of the fastmapped volume
476 * @data_pad: data_pad value of the fastmapped volume
477 * @used_ebs: number of used LEBs within this volume
494 * struct ubi_fm_eba - denotes an association beween a PEB and LEB