do_truncation(9)
π 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:
release_new_page_budget(9)release_existing_page_budget(9)allocate_budget(9)cancel_budget(9)populate_page(9)ubifs_do_bulk_read(9)ubifs_bulk_read(9)do_attr_changes(9)do_setattr(9)mctime_update_needed(9)update_mctime(9)
byeee bestie π β this page came from ./fs/ubifs, dated October 2026, and do_truncation(9) is signing off. π«Άβ¨
π¦ 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