ubifs_jnl_xrename(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ubifs_jnl_xrename(9) β€” from the Kernel API Manual πŸŽ€

okay bestie, gather round, because we're diving into ubifs_jnl_xrename(9) and honestly? it's giving "cross rename two directory entries" and it's serving main character energy in the UBIFS journal ✨


🌸 NAME 🌸

ubifs_jnl_xrename β€” cross rename two directory entries πŸ’–


✨ SYNOPSIS ✨

int ubifs_jnl_xrename (struct ubifs_info *c , const struct inode
       *fst_dir , const struct inode *fst_inode , const struct fscrypt_name
       *fst_nm , const struct inode *snd_dir , const struct inode *snd_inode ,
       const struct fscrypt_name *snd_nm , int sync );

🫢 ARGUMENTS 🫢

  • c β€” the UBIFS file-system description object, aka the vibe check for the whole filesystem πŸ’«
  • fst_dir β€” parent inode of the 1st directory entry to exchange
  • fst_inode β€” 1st inode to exchange
  • fst_nm β€” name of the 1st inode to exchange
  • snd_dir β€” parent inode of the 2nd directory entry to exchange
  • snd_inode β€” 2nd inode to exchange
  • snd_nm β€” name of the 2nd inode to exchange
  • sync β€” non-zero if the write-buffer has to be synchronized πŸ‘€

πŸ”₯ DESCRIPTION πŸ”₯

so this function? it literally implements the cross rename operation, and no cap, this one may involve writing 2 inodes and 2 directory entries β€” double the inodes, double the drama 😭✨

it marks the written inodes as clean and returns zero on success 🫢 in case of failure, a negative error code is returned πŸ’€

bestie listen: success = 0, failure = negative error code. that's the whole plot, don't forget it πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file ./fs/ubifs/journal.c and honestly the 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_update(9), ubifs_jnl_write_data(9), ubifs_jnl_write_inode(9), ubifs_jnl_delete_inode(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 whole page, bestie πŸ¦‹ this iconic little entry lives in ./fs/ubifs and it's dated October 2026 β€” so like, future vibes only ⭐ slay, periodt, go read the kernel source πŸ’œ

πŸ“¦ where this page comes from