nilfs_sufile_set_suinfo(9)
π nilfs_sufile_set_suinfo(9) π
ok so this is a page from the Kernel API Manual β yes bestie, we're in kernel land today, put your hair up, we're going in π§β¨
β¨ NAME β¨
nilfs_sufile_set_suinfo β sets segment usage info π
like, it literally updates the segment usage info. that's the whole vibe. no cap.
πΈ SYNOPSIS πΈ
ssize_t nilfs_sufile_set_suinfo (struct inode *sufile , void *buf ,
unsigned int supsz , size_t nsup );
π¦ ARGUMENTS π¦
sufileβ the inode of the segment usage file π that's your main character right there.bufβ an array ofsuinfo_updateπ yes, an array, plural energy.supszβ the byte size of asuinfo_updateπ (one of them, not the whole pile)nsupβ the size of thesuinfo_updatearray π i.e. how many of them you're handing over.
π DESCRIPTION π
okay so picture this: you hand it an array of nilfs_suinfo_update structs, and it updates the segment usage accordingly. that's it. that's the function. ate and left no crumbs π₯
but here's the important part, bestie β only the fields indicated by the sup_flags get updated. the way that it's selective?? iconic. it will not touch what you didn't ask it to touch π
β RETURN β
0 on success π or one of these negative error codes when it's not giving:
-EINVALβ invalid values in the input π specifically the segment number, flags ornblocks. check your inputs before you come at it like that.-EIOβ I/O error π and yes, that includes metadata corruption, so likeβ¦ be aware.-ENOMEMβ not enough memory available π«Ά the classic. insufficient memory, insufficient vibes.
π SEE ALSO π
- Kernel file
./fs/nilfs2/sufile.cπ (the source, the origin story) struct nilfs_sufile_info(9)nilfs_sufile_segment_usage_offset(9)nilfs_sufile_get_ncleansegs(9)nilfs_sufile_updatev(9)nilfs_sufile_set_alloc_range(9)nilfs_sufile_alloc(9)nilfs_sufile_mark_dirty(9)nilfs_sufile_set_segment_usage(9)nilfs_sufile_get_stat(9)nilfs_sufile_truncate_range(9)nilfs_sufile_resize(9)nilfs_sufile_get_suinfo(9)nilfs_sufile_trim_fs(9)nilfs_sufile_read(9)
like, the whole sufile friend group π«Ά go read all of them, iykyk π
and that's the page!! mwah π sourced straight from ./fs/nilfs2, dated October 2026 β so like, freshly stamped, go forth and set that suinfo bestie ππ¦π
π¦ 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