do_truncation(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ do_truncation(9) πŸŽ€

okay so we’re in the Kernel API Manual, bestie, and this page is all about do_truncation(9) β€” the little function that handles truncating an inode. no cap, it’s giving kernel-internals realness. πŸ’–

✨ NAME ✨

do_truncation β€” truncate an inode.

✨ SYNOPSIS ✨

int do_truncation (struct ubifs_info *c , struct inode *inode , const
       struct iattr *attr );

✨ ARGUMENTS ✨

  • c β€” UBIFS file-system description object.
  • inode β€” inode to truncate. yes bestie, that exact inode.
  • attr β€” inode attribute changes description.

✨ DESCRIPTION ✨

This function implements the VFS '->setattr' call when the inode is truncated to a smaller size. that’s the whole assignment, and it ate. πŸ’…

✨ RETURN ✨

Returns 0 in case of success and a negative error code in case of failure. slay when it works, negative error code when it doesn’t. 😭

✨ SEE ALSO ✨

Kernel file ./fs/ubifs/file.c β€” that’s the file to peek at. the reference squad is:


byeee bestie πŸ’– β€” this page came from ./fs/ubifs, dated October 2026, and do_truncation(9) is signing off. 🫢✨

πŸ“¦ where this page comes from