ubifs_jnl_delete_inode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ubifs_jnl_delete_inode β€” a Kernel API Manual moment (section 9, bestie)

okay so this is ubifs_jnl_delete_inode(9), straight out of the Kernel API Manual, and yes it's exactly what it sounds like: it deletes an inode. icon behavior. let's get into it 🫢


✨ NAME ✨

ubifs_jnl_delete_inode β€” delete an inode. that's it. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

int ubifs_jnl_delete_inode (struct ubifs_info *c , const struct inode
*inode );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • c β€” the UBIFS file-system description object. your whole filesystem's little passport, basically πŸ’–
  • inode β€” the inode to delete. bye bestie πŸ‘‹

πŸ‘‘ DESCRIPTION πŸ‘‘

so this function deletes the inode inode, and that includes:

  • removing it from orphans,
  • deleting it from TNC,
  • and, in some cases, writing a deletion inode to the journal.

all in one go. main character energy, honestly ✨

When regular file inodes are unlinked, or a directory inode is removed, the direntry to the media, and adds the inode to orphans. After this, when the last reference to this inode has been dropped, this function is called. In general, it has to write one more deletion inode to the media, because if a commit happened between ubifs_jnl_update and anymore, and in fact it might not be on the flash anymore, because it might have been garbage-collected already.

And for optimization reasons UBIFS does not read the orphan area if it has been unmounted cleanly, so it would have no indication in the journal that there is a deleted inode which has to be removed from TNC.

ngl bestie, this manpage has some sentences that literally cut off mid-thought 😭 i'm not gonna invent the missing words β€” no cap, that would be making stuff up β€” so you're getting the text exactly as it stands. the facts that are here are all here 🫢

However, if there was no commit between ubifs_jnl_update and inode to the media for the second time. And this is quite a typical case. πŸ’«

This function returns zero in case of success and a negative error code in case of failure. periodt.


🌈 SEE ALSO 🌈

Kernel file ./fs/ubifs/journal.c and its whole friend group:

like, the entire journal.c friend group showed up to the party πŸ§šπŸ’œ


and that's the whole page! this one lives in ./fs/ubifs, dated October 2026 β€” so go forth, delete those inodes, and slay πŸ’…β­

πŸ“¦ where this page comes from