ubifs_jnl_rename(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ubifs_jnl_rename(9) πŸ’…

okay so bestie, you found a page from the Kernel API Manual β€” yes, that ubifs_jnl_rename(9) one β€” and I'm gonna walk you through it like we're texting at 2am. pull up a chair. πŸŽ€


✨ NAME ✨

ubifs_jnl_rename β€” rename a directory entry. that's it, that's the whole vibe. one job, and it does it. πŸ‘‘


🌸 SYNOPSIS 🌸

int ubifs_jnl_rename (struct ubifs_info *c , const struct inode *old_dir
, const struct inode *old_inode , const struct fscrypt_name *old_nm ,
const struct inode *new_dir , const struct inode *new_inode , const
struct fscrypt_name *new_nm , const struct inode *whiteout , int sync ,
int delete_orphan );

look at all those parameters. ten of them. she's high-maintenance and we respect it. returns an int, obviously. πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • c β€” the UBIFS file-system description object. it's giving "main character" β€” everything else just hangs off this.
  • old_dir β€” parent inode of the directory entry you wanna rename. the old one. the origin story.
  • old_inode β€” the inode of the directory entry you're renaming. that's the thing being moved, bestie.
  • old_nm β€” the old name of the directory entry being renamed. its government name, if you will.
  • new_dir β€” parent inode of the directory entry you're renaming to. new home, new energy.
  • new_inode β€” the new directory entry's inode (or, plot twist, the directory entry's inode that's getting replaced). both cases, one slot. πŸ™ˆ
  • new_nm β€” the new name for the new directory entry. glow-up name. ✨
  • whiteout β€” the whiteout inode. yes that's a real thing, no I'm not making it up.
  • sync β€” non-zero if the write-buffer has to be synchronized. so: zero means nah, non-zero means yes bestie flush it. πŸ”₯
  • delete_orphan β€” indicates an orphan entry deletion for whiteout. lowkey important, don't skip it.

πŸ’œ DESCRIPTION πŸ’œ

so this function? it implements the re-name operation. and listen β€” this is not a lil casual thing, because it may involve writing up to 4 inodes (the new inode, the whiteout inode, and the old and new parent directory inodes) and 2 directory entries. that's a whole lot of writing, hence the jnl in the name β€” journal business, iykyk. πŸ““

then it marks the written inodes as clean and returns zero on success. iconic. zero is the good number here.

but if something goes wrong? it returns a negative error code. that's the "not me crying in errno" moment. 😭 no cap, negative means bad news.


🌈 SEE ALSO 🌈

the Kernel file ./fs/ubifs/journal.c, plus a whole squad of friends β€” literally the entire group chat:

all 24 of them, present and accounted for. 🫢 go read them, they're literally all in ./fs/ubifs/journal.c and they all ate. πŸ’…


heads up bestie: this page lives under ./fs/ubifs and it's dated October 2026, so yes, it's from the future (of this doc, anyway). stay hydrated, back up your filesystems, and remember β€” zero is success, negative is a whole mood. ⭐

bye bestie, ily, go rename something responsibly πŸ§šβ€β™€οΈπŸ’œπŸ“

πŸ“¦ where this page comes from