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

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
14 #include <mtd/ubi-user.h>
17 #define UBI_ALL -1
26 * enum ubi_open_mode - UBI volume open mode constants.
28 * UBI_READONLY: read-only mode
29 * UBI_READWRITE: read-write mode
31 * UBI_METAONLY: modify only the volume meta-data,
32 * i.e. the data stored in the volume table, but not in any of volume LEBs.
42 * struct ubi_volume_info - UBI volume description data structure.
43 * @vol_id: volume ID
44 * @ubi_num: UBI device number this volume belongs to
45 * @size: how many physical eraseblocks are reserved for this volume
46 * @used_bytes: how many bytes of data this volume contains
47 * @used_ebs: how many physical eraseblocks of this volume actually contain any
49 * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME)
50 * @corrupted: non-zero if the volume is corrupted (static volumes only)
51 * @upd_marker: non-zero if the volume has update marker set
52 * @alignment: volume alignment
54 * this volume
55 * @name_len: volume name length
56 * @name: volume name
57 * @cdev: UBI volume character device major and minor numbers
60 * for dynamic ones. This is because UBI does not care about dynamic volume
61 * data protection and only cares about protecting static volume data.
63 * The @upd_marker flag is set if the volume update operation was interrupted.
64 * Before touching the volume data during the update operation, UBI first sets
65 * the update marker flag for this volume. If the volume update operation was
67 * is set, the contents of the volume is certainly damaged and a new volume
72 * o the @corrupted flag means that this static volume is corrupted for some
73 * reasons, but not because an interrupted volume update
74 * o the @upd_marker field means that the volume is damaged because of an
80 * volumes and contain the number of bytes stored in this static volume and how
85 * In general, logical eraseblock size is a property of the UBI device, not
86 * of the UBI volume. Indeed, the logical eraseblock size depends on the
87 * physical eraseblock size and on how much bytes UBI headers consume. But
88 * because of the volume alignment (@alignment), the usable size of logical
89 * eraseblocks if a volume may be less. The following equation is true:
90 * @usable_leb_size = LEB size - (LEB size mod @alignment),
91 * where LEB size is the logical eraseblock size defined by the UBI device.
97 * volume logical eraseblock sizes.
117 * struct ubi_sgl - UBI scatter gather list data structure.
133 * ubi_sgl_init - initialize an UBI scatter gather list data structure.
134 * @usgl: the UBI scatter gather struct itself
141 usgl->list_pos = 0; in ubi_sgl_init()
142 usgl->page_pos = 0; in ubi_sgl_init()
146 * struct ubi_device_info - UBI device description data structure.
147 * @ubi_num: ubi device number
148 * @leb_size: logical eraseblock size on this UBI device
154 * @ro_mode: if this device is in read-only mode
155 * @cdev: UBI character device major and minor numbers
157 * Note, @leb_size is the logical eraseblock size offered by the UBI device.
158 * Volumes of this UBI device may have smaller logical eraseblock size if their
163 * %1. However, it does not mean than NOR flash has to write data byte-by-byte.
164 * Instead, CFI NOR flashes have a write-buffer of, e.g., 64 bytes, and when
165 * writing large chunks of data, they write 64-bytes at a time. Obviously, this
188 * Volume notification types.
189 * @UBI_VOLUME_ADDED: a volume has been added (an UBI device was attached or a
190 * volume was created)
191 * @UBI_VOLUME_REMOVED: a volume has been removed (an UBI device was detached
192 * or a volume was removed)
193 * @UBI_VOLUME_RESIZED: a volume has been re-sized
194 * @UBI_VOLUME_RENAMED: a volume has been re-named
195 * @UBI_VOLUME_SHUTDOWN: a volume is going to removed, shutdown users
196 * @UBI_VOLUME_UPDATED: data has been written to a volume
198 * These constants define which type of event has happened when a volume
211 * struct ubi_notification - UBI notification description structure.
212 * @di: UBI device description object
213 * @vi: UBI volume description object
215 * UBI notifiers are called with a pointer to an object of this type. The
217 * UBI device and UBI volume the notification informs about.
224 /* UBI descriptor given to users when they open UBI volumes */