make_reservation(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« make_reservation(9) πŸ’«

okay so this is make_reservation, straight out of the kernel API manual β€” it's literally the function that reserves journal space. yes bestie, journal space. it's giving "I got us a table at the club" but the club is the journal head πŸŽ€


✨ SYNOPSIS ✨

int make_reservation (struct ubifs_info *c , int jhead , int len );

that's it. that's the whole signature. three lil args, one int back. slay πŸ’…


🫢 ARGUMENTS 🫢

  • c β€” the UBIFS file-system description object, aka the whole vibe of the filesystem in one struct πŸ¦‹
  • jhead β€” the journal head. this is the specific one we're reserving space in, iykyk
  • len β€” how many bytes to reserve. like how much room we're claiming, fr fr

🌸 DESCRIPTION 🌸

so make_reservation makes a space reservation in journal head jhead. that's the whole main character move ✨

here's the tea tho: the function takes the commit lock and locks the journal head. and because it does that, you β€” the caller β€” have to unlock the head and close out the reservation with finish_reservation. no ghosting the lock, bestie 😭

what does it return?

  • zero πŸŽ‰ in case of success
  • a negative error code πŸ’€ in case of failure
⚠️ ok important note, read this twice: the journal head may be unlocked as soon as the data is written, but the commit lock has to be released only after the data has been added to the TNC. that's not a suggestion, that's the rule. don't mix up the ordering, I'm begging πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

everything here lives in the kernel file ./fs/ubifs/journal.c β€” go be nosy, it's iconic:


and that's the page!! πŸ’– this one came to you from ./fs/ubifs, dated October 2026 β€” screenshot it, frame it, put it on the fridge, it's giving collector's edition πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from