btt_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… btt_init(9) β€” the kernel API glow-up

okay bestie, so this page is from the Kernel API Manual, and today's main character is btt_init(9) β€” literally the function that gets your Block Translation Table born. no cap, let's get into it πŸŽ€


✨ NAME ✨

btt_init β€” initialize a block translation table for the given device

like, it sets the whole thing up for the device you hand it. iconic behavior only.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct btt * btt_init (struct nd_btt *nd_btt , unsigned long long
rawsize , u32 lbasize , uuid_t *uuid , struct nd_region *nd_region );

so yeah, it returns a struct btt * and takes five lil arguments. we'll go through them one by one, don't worry πŸ’–


🌸 ARGUMENTS 🌸

  • nd_btt β€” the device that's carrying all the BTT geometry and the backing device info. it's giving "knows everything about the setup" energy.
  • rawsize β€” the raw size, in bytes, of the backing device. yes, bytes. an unsigned long long of them. huge. we love a big number πŸ”₯
  • lbasize β€” the lba size of the backing device. it's a u32, keep it cute.
  • uuid β€” a uuid for the backing device, and bestie, this one is literally stored on media, so don't go being messy with it πŸ™ˆ
  • nd_region β€” the struct nd_region for the REGION device. yes, the REGION device. it's in the name ✨

🧚 DESCRIPTION 🧚

so what does it do? it initializes a Block Translation Table on a backing device. and the whole point? to provide single sector power fail atomicity. that's the vibe, that's the whole reason it exists, and honestly? we're obsessed πŸ’…


πŸ‘‘ CONTEXT πŸ‘‘

Might sleep.

that's it. that's the whole section. she might sleep 😴 so like, don't call her somewhere she can't catch a nap, iykyk.


⭐ RETURN ⭐

  • Success β†’ a pointer to a brand new struct btt πŸŽ‰
  • Failure β†’ NULL πŸ’€

periodt.


🌈 SEE ALSO 🌈

  • Kernel file ./drivers/nvdimm/btt.c
  • btt_fini(9) β€” the cleanup bestie, go check her out too 🫢

and that's the page, bestie! this one came to you from ./drivers/nvdimm, dated October 2026, and it's serving btt_init(9) realness from the Kernel API Manual. slay, read responsibly, and may your power failures always be atomic πŸ’œβœ¨

πŸ“¦ where this page comes from