Lines Matching +full:erase +full:- +full:size

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
22 /* The highest erase counter value supported by this implementation */
28 /* Erase counter header magic number (ASCII "UBI#") */
47 * @UBI_VTBL_AUTORESIZE_FLG: auto-resize this volume
51 * check. Main use-case for this flag is
52 * boot-time reduction
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
66 * The auto-resize feature is useful for device production purposes. For
75 * which will store the root file system) is marked as "auto-resizable", and
76 * UBI will adjust its size on the first boot if needed.
79 * eraseblock handling, and then re-sizes the volume, not vice-versa. This
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.
115 * @magic: erase counter header magic number (%UBI_EC_HDR_MAGIC)
119 * @ec: the erase counter
124 * @hdr_crc: erase counter header CRC checksum
126 * The erase counter header takes 64 bytes and has a plenty of unused space for
141 * same on all eraseblocks. UBI will ensure that all new erase counter headers
151 __be64 ec; /* Warning: the current limit is 31-bit anyway! */
160 * struct ubi_vid_hdr - on-flash UBI volume identifier header.
166 * eraseblock (for wear-leveling reasons)
186 * unsigned 64-bit integer and we assume it never overflows. The @sqnum
195 * 1. Because UBI may erase physical eraseblocks asynchronously, the following
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
242 * - it just ignores the Ext3fs journal.
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
257 * @data_size field contains data size.
264 * parameter. So, effectively, the @data_pad field reduces the size of logical
265 * eraseblocks of this volume. This is very handy when one uses block-oriented
294 #define UBI_INTERNAL_VOL_START (0x7FFFFFFF - 4096)
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.
337 * If the size of the logical eraseblock is large enough to fit
339 * records. Otherwise, it contains as many records as it can fit (i.e., size of
347 * later changed. It may be useful, for example, when a block-oriented file
349 * logical eraseblock size and @alignment. The alignment must be multiple to the
368 /* UBI fastmap on-flash data structures */
373 /* fastmap on-flash data structure format version */
391 * But the size of this pool is limited to be between UBI_FM_MIN_POOL_SIZE and
397 * struct ubi_fm_sb - UBI fastmap super block
403 * @block_ec: the erase counter of each used PEB
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
445 * @size: current pool size
446 * @max_size: maximal pool size
451 __be16 size; member
460 * struct ubi_fm_ec - stores the erase counter of a PEB
470 * struct ubi_fm_volhdr - Fastmap volume header
493 * struct ubi_fm_eba - denotes an association between a PEB and LEB