write_head(9)
β¨ write_head(9) β Kernel API Manual β¨
okay bestie, we're in the Kernel API Manual and this page is literally all about write_head. Buckle up, it's giving "tiny function, very specific UBIFS job." π
πΈ NAME πΈ
write_head β write data to a journal head. That's it, that's the whole name section, and it ate. π«Ά
π¦ SYNOPSIS π¦
the signature is right here, copy it exactly, no improv:
int write_head (struct ubifs_info *c , int jhead , void *buf , int len ,
int *lnum , int *offs , int sync );
π ARGUMENTS π
cβ UBIFS file-system description object. the context bestie, the main-character struct. πjheadβ journal head. the head we're writing into. πbufβ buffer to write. the actual data vibe. πlenβ length to write. how much of the buffer is coming with us. β¨lnumβ LEB number written is returned here. yes, this is where that output goes. π₯offsβ offset written is returned here. the offset output lives here too. πsyncβ non-zero if the write-buffer has to by synchronized. (that wording is literally from the page, bestie π) π
π DESCRIPTION π
okay so write_head writes data to the reserved space of journal head jhead. It returns zero in case of success β slay β and a negative error code in case of failure β not slay, but important. π
no cap, that's the behavior: zero on success, negative error code on failure. periodt. π
π§ SEE ALSO π§
the Kernel file ./fs/ubifs/journal.c is in the group chat, along with this whole friend list:
zero_ino_node_unused(9)zero_dent_node_unused(9)zero_trun_node_unused(9)reserve_space(9)__queue_and_wait(9)wait_for_reservation(9)wake_up_reservation(9)add_or_start_queue(9)make_reservation(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)
π cute sign-off: source/version is./fs/ubifs, the date isOctober 2026, and the page iswrite_head(9). mwah, bestie, go write some journal-head data responsibly π«Άπ
π¦ 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