make_reservation(9)
π« 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, iykyklenβ 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:
zero_ino_node_unused(9)zero_dent_node_unused(9)zero_trun_node_unused(9)reserve_space(9)write_head(9)__queue_and_wait(9)wait_for_reservation(9)wake_up_reservation(9)add_or_start_queue(9)release_head(9)finish_reservation(9)get_dent_type(9)pack_inode(9)mark_inode_clean(9)ubifs_jnl_update(9)ubifs_jnl_write_data(9)ubifs_jnl_write_inode(9)ubifs_jnl_delete_inode(9)ubifs_jnl_xrename(9)ubifs_jnl_rename(9)truncate_data_node(9)ubifs_jnl_truncate(9)ubifs_jnl_delete_xattr(9)ubifs_jnl_change_xattr(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms