bdi_get_by_id(9)
π bdi_get_by_id(9) β from the Kernel API Manual, bestie
okay so picture this: you're deep in kernel-land, it's giving 9-section man page energy, and you need to find a bdi by its id. That's literally this whole page. Let's go π«Ά
β¨ NAME β¨
bdi_get_by_id β lookup and get bdi from its id π
πΈ SYNOPSIS πΈ
struct backing_dev_info * bdi_get_by_id (u64 id );
like, hand it an id and it hands you back a struct backing_dev_info *. iconic behavior honestly.
π ARGUMENTS π
idβ the bdi id you wanna look up. that's it. that's the whole argument. slay π
π¦ DESCRIPTION π¦
So what it does: it finds the bdi that matches id and gets it. β¨
And here's the part you gotta remember, fr fr β it returns NULL if the matching bdi doesn't exist or is already unregistered. Both of those cases? NULL. No cap. So like, always check before you go dereferencing anything, bestie ππ
lowkey a vibe check: no match =NULL, already unregistered = alsoNULL. don't get caught out there π
π SEE ALSO π
Kernel file ./mm/backing-dev.c plus these little icons:
go read them, they're all in the same friend group fr π
and that's the page!! mwah π this little gem lives over in ./mm, dated October 2026 β thank you for coming to my ted talk, go get that bdi π§ββοΈβ
π¦ 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