nilfs_ioctl_do_get_suinfo(9)
π nilfs_ioctl_do_get_suinfo β the kernel API manual, but make it make sense
okay so bestie, this is a page from the Kernel API Manual (section 9, kernel-land, not your regular man 1 situation) and the star of the show is nilfs_ioctl_do_get_suinfo. it's literally the callback method that gets segment usage info. that's the whole vibe. let's get into it π
β¨ NAME β¨
nilfs_ioctl_do_get_suinfo β the callback method that goes and gets segment usage info. yep, that's her job description. π
πΈ SYNOPSIS πΈ
ssize_t nilfs_ioctl_do_get_suinfo (struct the_nilfs *nilfs , __u64 *posp
, int flags , void *buf , size_t size , size_t nmembs );
like, look at that signature. so many parameters. she's got range. π¦
π«Ά ARGUMENTS π«Ά
nilfsβ the nilfs object. the main character, honestly.pospβ a pointer on an array of segment numbers. it's giving "here's the list, go off" β¨flagsβ not used. literally ignored. she said "no thoughts, head empty" πbufβ the buffer for storing the suinfo array. this is where the goods land.sizeβ the size in bytes of one suinfo item in the array. one (1) single item. measure twice.nmembsβ the count of segment numbers and suinfos in the array. yes, both. they're matching. π
π DESCRIPTION π
so the nilfs_ioctl_do_get_suinfo function returns segment usage info about the requested segments. like, you ask about segments, it hands you the tea about those segments. periodt.
the NILFS_IOCTL_GET_SUINFO ioctl is what's used in lssu, nilfs_resize utilities and by the nilfs_cleanerd daemon. so yeah, she's booked and busy β multiple clients, one icon. π₯
β RETURN β
on success? it returns the count of nilfs_suinfo structures in the output buffer. slay.
on failure? a negative error code. π not the negative energy. handle your errors, bestie.
π¦ SEE ALSO π¦
the whole friend group, no cap:
- Kernel file
./fs/nilfs2/ioctl.c nilfs_ioctl_wrap_copy(9)nilfs_fileattr_get(9)nilfs_fileattr_set(9)nilfs_ioctl_getversion(9)nilfs_ioctl_change_cpmode(9)nilfs_ioctl_delete_checkpoint(9)nilfs_ioctl_do_get_cpinfo(9)nilfs_ioctl_get_cpstat(9)nilfs_ioctl_get_sustat(9)nilfs_ioctl_do_get_vinfo(9)nilfs_ioctl_do_get_bdescs(9)nilfs_ioctl_get_bdescs(9)nilfs_ioctl_move_inode_block(9)nilfs_ioctl_move_blocks(9)nilfs_ioctl_delete_checkpoints(9)nilfs_ioctl_free_vblocknrs(9)nilfs_ioctl_mark_blocks_dirty(9)nilfs_ioctl_clean_segments(9)nilfs_ioctl_sync(9)nilfs_ioctl_resize(9)nilfs_ioctl_trim_fs(9)nilfs_ioctl_set_alloc_range(9)nilfs_ioctl_get_info(9)nilfs_ioctl_set_suinfo(9)nilfs_ioctl_get_fslabel(9)nilfs_ioctl_set_fslabel(9)
ok that's the whole page, go read the source, ily π
and that's a wrap, bestie π this one lives in ./fs/nilfs2, it's dated October 2026, and you can find her under nilfs_ioctl_do_get_suinfo(9) in the Kernel API Manual. mwah. πβ¨
π¦ 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