STRUCT NILFS_BMAP_STORE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct nilfs_bmap_store πŸ’–

Kernel API Manual · section 9 · the shadow-copy glow-up you didn't know you needed ✨

okay bestie, so this is a kernel struct page, and yes it's a whole vibe. it lives in the kernel API manual (that's the manual name, iykyk) and it's literally just a lil snapshot container. no cap, it's giving "save state before you do something unhinged" 🫢


🌸 NAME 🌸

struct nilfs_bmap_store β€” shadow copy of bmap state πŸ’…

like… a photocopy of your bmap state. a spare. a little backup bestie. periodt.


✨ SYNOPSIS ✨

struct nilfs_bmap_store {
    __le64 data[NILFS_BMAP_SIZE / sizeof(__le64)];
    __u64 last_allocated_key;
    __u64 last_allocated_ptr;
    int state;
 };

copy it exactly, don't be weird about it πŸ”₯ (yes, the spacing is a little funky at the end, that's just how the original ate, leave it)


πŸŽ€ Members πŸŽ€

  • data β€” the cached raw block mapping of the on-disk inode. literally the receipts, cached. πŸ’Ύ
  • last_allocated_key β€” the cached value of the last allocated key for the data block. it remembers the last key so you don't have to πŸ—οΈ
  • last_allocated_ptr β€” the cached value of the last allocated ptr for the data block. the matching pointer bestie, keeping last_allocated_key company 🫢
  • state β€” the cached value of the state field of the bmap structure. a little photocopy of the state field, iconic behaviour πŸ‘‘

so yeah, all four are cached values β€” that's the whole point of the struct. shadow copy energy only. no original claims, no improvisation 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./fs/nilfs2/bmap.h β€” the source of truth, go read it if you're nosy (respectfully) πŸ“–
  • union nilfs_bmap_ptr_req(9)
  • struct nilfs_bmap_stats(9)
  • struct nilfs_bmap_operations(9)
  • struct nilfs_bmap(9)

the whole friend group, fr fr πŸ’œ


and that's the page!! source: ./fs/nilfs2, dated October 2026 β€” mwah, drink water, and go read bmap.h πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from