in_pq(9)
π in_pq(9) β like, the whole vibe check on a wear-leveling entry π
okay so bestie, we're deep in the kernel API manual (Kernel API Manual, no big deal, only iconic) and today's main character is in_pq(9). yes the 9 is part of the name, she's a section-9 girlie, we respect her π
β¨ NAME β¨
in_pq β the function that checks if a wear-leveling entry is present in the protection queue. that's it. that's the whole job. and honestly? she ate. π
πΈ SYNOPSIS πΈ
int in_pq (const struct ubi_device *ubi , struct ubi_wl_entry *e );
copy it exactly like that, spacing and all, do not come for me about the space before the parens, that's just how the manual page wrote it, we don't edit the manual page, we love the manual page π«Ά
π¦ ARGUMENTS π¦
ubiβ the UBI device description object. yeah. the whole device. she's the context, she's the setting, she's the stage. πeβ the wear-leveling entry you want to check. the little guy in question. the subject of the investigation. π
β DESCRIPTION β
okay so here's the tea, no cap: this function returns non-zero if e is in the protection queue, and zero if it is not. that's the entire plot. that's the arc. iykyk. β¨
like, think of it as a vibe check for entries β are you in the queue or are you not, bestie? in_pq will literally tell you. non-zero = yes, zero = no. simple as. π
π SEE ALSO π
the kernel file lives at ./drivers/mtd/ubi/wl.c β that's the source, the mothership, the origin story π§
and now the full squad, all of them, every single one, in order, because we do not leave anyone out of the group chat:
wl_tree_add(9)wl_entry_destroy(9)do_work(9)in_wl_tree(9)prot_queue_add(9)find_wl_entry(9)find_mean_wl_entry(9)wl_get_wle(9)prot_queue_del(9)ubi_sync_erase(9)serve_prot_queue(9)__schedule_ubi_work(9)schedule_ubi_work(9)schedule_erase(9)do_sync_erase(9)wear_leveling_worker(9)ensure_wear_leveling(9)__erase_worker(9)ubi_wl_put_peb(9)ubi_wl_scrub_peb(9)ubi_wl_flush(9)ubi_bitflip_check(9)tree_destroy(9)ubi_thread(9)shutdown_work(9)erase_aeb(9)ubi_wl_init(9)protection_queue_destroy(9)ubi_wl_close(9)self_check_ec(9)self_check_in_wl_tree(9)self_check_in_pq(9)produce_free_peb(9)ubi_wl_get_peb(9)
π‘ friendly reminder bestie: that whole list above is literally the SEE ALSO section, so if you're looking for a function and it's not there, it's not there, don't come for me, come for the manpage π
okay bye bestie, love u, stay hydrated, and remember β ./drivers/mtd/ubi, October 2026, in_pq(9), Kernel API Manual. that's the sign-off, that's the footer, that's the whole era. periodt. ππ₯π
π¦ 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