nilfs_bmap_lookup_at_level(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nilfs_bmap_lookup_at_level(9) β€” like, the kernel API manual page, bestie

okay so picture this: it's a Kernel API Manual page, section 9, and the star of the show is nilfs_bmap_lookup_at_level. yes the name is a mouthful. no we're not renaming it. it's iconic like that. ✨


🌸 NAME 🌸

nilfs_bmap_lookup_at_level β€” literally goes and finds a data block or a node block for you πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

int nilfs_bmap_lookup_at_level (struct nilfs_bmap *bmap , __u64 key ,
       int level , __u64 *ptrp );

like, that's the whole signature. copy it exactly, don't @ me πŸ’…


✨ ARGUMENTS ✨

  • bmap β€” the bmap. yeah. that's the description. it's a bmap. moving on 🫢
  • key β€” the key. also exactly what it sounds like. no notes. πŸ“
  • level β€” the level. yep. that one too. 😭
  • ptrp β€” the place where the value associated with key gets stored. this one actually got a real description, we love that for it πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so nilfs_bmap_lookup_at_level's whole job is: find a record whose key matches key, inside the block that lives at level of the bmap. that's the vibe check. πŸ”₯

and then β€” the record associated with key gets stored in the place pointed to by ptrp. so like, ptrp is where the tea gets delivered πŸ“¬


🌈 RETURN 🌈

  • Returns 0 on success β€” slay, we love a clean return πŸ’œ
  • or one of these negative error codes on failure, and yes they're all negative, that's the whole point:
  • -EIO β€” I/O error (including metadata corruption). bestie the metadata is corrupted, be so serious 😭
  • -ENOENT β€” a record associated with key does not exist. it's giving "we looked and there's nothing there" πŸ’€
  • -ENOMEM β€” insufficient memory available. the memory said no πŸ™ˆ

🧚 SEE ALSO 🧚

kernel file ./fs/nilfs2/bmap.c (yes, that's the file), plus the whole bmap friend group β€” they all show up together, iykyk:

like, the entire roster. we love a supporting cast 🌟


fr fr: this page comes from ./fs/nilfs2, and it's dated October 2026. that's the source and the date, both present and accounted for, no cap 🫢

okay that's the page!! go forth and look up your blocks, main character energy only πŸ‘‘πŸ’–

πŸ“¦ where this page comes from