ubi_next_sqnum(9)
๐ NAME ๐
ubi_next_sqnum โ bestie, this one gets you the next sequence number, no cap โจ
๐ธ SYNOPSIS ๐ธ
unsigned long long ubi_next_sqnum (struct ubi_device *ubi );
๐ ARGUMENTS ๐
ubiโ the UBI device description object ๐ซถ (yes, it's astruct ubi_device *, she's the main character here)
โจ DESCRIPTION โจ
Okay so picture this: this function hands you back the next sequence number to use, and that number is literally just the current value of the global sequence counter. That's it. That's the whole vibe. ๐
And because it's not a greedy little thing, it also bumps the global sequence counter up while it's at it โ so the next call gets a fresh one. Increment and hand-off, slay. ๐ฅ
ngl, keep the "it increases the counter too" part in mind โ that's a side effect, and side effects are always the plot twist ๐ญ
๐ฆ SEE ALSO ๐ฆ
Kernel file ./drivers/mtd/ubi/eba.c, plus the whole friend group:
- Structs & friends:
struct ubi_eba_entry(9),struct ubi_eba_table(9) - Compat & descriptions:
ubi_get_compat(9),ubi_eba_get_ldesc(9) - Table life cycle:
ubi_eba_create_table(9),ubi_eba_destroy_table(9),ubi_eba_copy_table(9),ubi_eba_replace_table(9) - The ltree girlies:
ltree_lookup(9),ltree_add_entry(9) - Locking era ๐:
leb_read_lock(9),leb_read_unlock(9),leb_write_lock(9),leb_write_trylock(9),leb_write_unlock(9) - Mapping stuff:
ubi_eba_is_mapped(9),ubi_eba_unmap_leb(9),check_mapping(9) - Reading & writing:
ubi_eba_read_leb(9),ubi_eba_read_leb_sg(9),ubi_eba_write_leb(9),ubi_eba_write_leb_st(9) - Recovery arc ๐ฎโ๐จ:
try_recover_peb(9),recover_peb(9),try_write_vid_and_data(9) - Error & copy business:
is_error_sane(9),ubi_eba_copy_leb(9) - The rest of the roster:
print_rsvd_warning(9),self_check_eba(9),ubi_eba_init(9)
๐ aaaand that's the page!! brought to you from the ./drivers/mtd/ubi corner of the kernel tree, dated October 2026 โ mwah, go read the source bestie, it's giving iconic ๐งโโ๏ธโญ
๐ฆ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms