include/uapi/mtd/ubi-user.h
Source file repositories/reference/linux-study-clean/include/uapi/mtd/ubi-user.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/mtd/ubi-user.h- Extension
.h- Size
- 19854 bytes
- Lines
- 507
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct ubi_attach_reqstruct ubi_mkvol_reqstruct ubi_rsvol_reqstruct ubi_rnvol_reqstruct ubi_ecinfo_reqstruct ubi_leb_change_reqstruct ubi_map_reqstruct ubi_set_vol_prop_reqstruct ubi_blkcreate_req
Annotated Snippet
struct ubi_attach_req {
__s32 ubi_num;
__s32 mtd_num;
__s32 vid_hdr_offset;
__s16 max_beb_per1024;
__s8 disable_fm;
__s8 need_resv_pool;
__s8 padding[8];
};
/*
* UBI volume flags.
*
* @UBI_VOL_SKIP_CRC_CHECK_FLG: skip the CRC check done on a static volume at
* open time. Only valid for static volumes and
* should only be used if the volume user has a
* way to verify data integrity
*/
enum {
UBI_VOL_SKIP_CRC_CHECK_FLG = 0x1,
};
#define UBI_VOL_VALID_FLGS (UBI_VOL_SKIP_CRC_CHECK_FLG)
/**
* struct ubi_mkvol_req - volume description data structure used in
* volume creation requests.
* @vol_id: volume number
* @alignment: volume alignment
* @bytes: volume size in bytes
* @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME)
* @flags: volume flags (%UBI_VOL_SKIP_CRC_CHECK_FLG)
* @name_len: volume name length
* @padding2: reserved for future, not used, has to be zeroed
* @name: volume name
*
* This structure is used by user-space programs when creating new volumes. The
* @used_bytes field is only necessary when creating static volumes.
*
* The @alignment field specifies the required alignment of the volume logical
* eraseblock. This means, that the size of logical eraseblocks will be aligned
* to this number, i.e.,
* (UBI device logical eraseblock size) mod (@alignment) = 0.
*
* To put it differently, the logical eraseblock of this volume may be slightly
* shortened in order to make it properly aligned. The alignment has to be
* multiple of the flash minimal input/output unit, or %1 to utilize the entire
* available space of logical eraseblocks.
*
* The @alignment field may be useful, for example, when one wants to maintain
* a block device on top of an UBI volume. In this case, it is desirable to fit
* an integer number of blocks in logical eraseblocks of this UBI volume. With
* alignment it is possible to update this volume using plane UBI volume image
* BLOBs, without caring about how to properly align them.
*/
struct ubi_mkvol_req {
__s32 vol_id;
__s32 alignment;
__s64 bytes;
__s8 vol_type;
__u8 flags;
__s16 name_len;
__s8 padding2[4];
char name[UBI_MAX_VOLUME_NAME + 1];
} __packed;
/**
* struct ubi_rsvol_req - a data structure used in volume re-size requests.
* @vol_id: ID of the volume to re-size
* @bytes: new size of the volume in bytes
*
* Re-sizing is possible for both dynamic and static volumes. But while dynamic
* volumes may be re-sized arbitrarily, static volumes cannot be made to be
* smaller than the number of bytes they bear. To arbitrarily shrink a static
* volume, it must be wiped out first (by means of volume update operation with
* zero number of bytes).
*/
struct ubi_rsvol_req {
__s64 bytes;
__s32 vol_id;
} __packed;
/**
* struct ubi_rnvol_req - volumes re-name request.
* @count: count of volumes to re-name
* @padding1: reserved for future, not used, has to be zeroed
* @vol_id: ID of the volume to re-name
* @name_len: name length
* @padding2: reserved for future, not used, has to be zeroed
* @name: new volume name
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct ubi_attach_req`, `struct ubi_mkvol_req`, `struct ubi_rsvol_req`, `struct ubi_rnvol_req`, `struct ubi_ecinfo_req`, `struct ubi_leb_change_req`, `struct ubi_map_req`, `struct ubi_set_vol_prop_req`, `struct ubi_blkcreate_req`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.