bdi_get_by_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 = also NULL. 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