ubifs_jnl_update(9)
π ubifs_jnl_update(9) π
okay so this is a page from the Kernel API Manual, bestie β ubifs_jnl_update, coming at you straight out of the UBIFS corner of the kernel π¦
β¨ NAME β¨
ubifs_jnl_update β update inode. that's the whole vibe, that's the job π
πΈ SYNOPSIS πΈ
int ubifs_jnl_update (struct ubifs_info *c , const struct inode *dir ,
const struct fscrypt_name *nm , const struct inode *inode , int deletion
, int xent , int in_orphan );
π ARGUMENTS π
cβ the UBIFS file-system description object. like, the whole file system's personality in one struct π«Άdirβ the parent inode, or the host inode when we're talking extended attributes πnmβ the directory entry name, iconic little name-having legendinodeβ the inode we're updating. main character energy fr π₯deletionβ flags that this is a directory entry deletion, i.e. anunlinkor anrmdirπxentβ non-zero if the directory entry is an extended attribute entry πin_orphanβ says whether the inode is hanging out on the orphan list π
β DESCRIPTION β
so what does this function actually do? it updates an inode by writing a directory entry (or an extended attribute entry), the inode itself, and then the parent directory inode (or the host inode) to the journal. three things, one journal, slay β¨
and here's the detail that's lowkey the whole point: this function writes the host inode dir last. that ordering matters big time in the extended attributes case. like, because of it we can guarantee that if the host inode gets synchronized (with 'fsync'), and the write-buffer it sits in gets flushed, then the extended attribute inode gets flushed too. and that is exactly what the user expects β synchronizing the host inode synchronizes its extended attributes. same energy for directories: if dir is synchronized, then the directory entry in it that corresponds to nm gets synchronized too. no cap π§
if the inode (inode) or the parent directory (dir) are synchronous, this function synchronizes the write-buffer. periodt.
on the happy path, this function marks the dir and inode inodes as clean and returns zero. and if it fails? you get a negative error code back. π
π¦ SEE ALSO π¦
the Kernel file ./fs/ubifs/journal.c and its whole friend group:
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)make_reservation(9)release_head(9)finish_reservation(9)get_dent_type(9)pack_inode(9)mark_inode_clean(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)
ok that's the whole page, bestie π everything's here, nothing's missing, we ate and left no crumbs π
and yeah β this one ships from ./fs/ubifs, dated October 2026. mwah, bye ππ
π¦ 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