iterate_supers_type(9)
β¨ iterate_supers_type(9) β¨
okay so this is from the Kernel API Manual, bestie, and it's literally about calling a function for superblocks of a given type. iconic behavior fr fr π
πΈ NAME πΈ
iterate_supers_type β call function for superblocks of given type
π SYNOPSIS π
void iterate_supers_type (struct file_system_type *type , void
(*f)(struct super_block *, void *) , void *arg );
π ARGUMENTS π
typeβ the fs type, like, which flavor of filesystem we're talking about π¦fβ the function to call, the main character of this whole operationargβ the argument to pass to it, lil care package π
β¨ DESCRIPTION β¨
So here's the vibe: it scans the superblock list and calls the given function, passing it a locked superblock and the given argument. that's it, that's the whole thing. no cap, it's giving "iterator with commitment issues" but in a good way π
lowkey important detail: the superblock arrives locked when your function gets it. do not sleep on that. π
π₯ SEE ALSO π₯
Kernel file ./fs/super.c:
super_lock(9)alloc_super(9)deactivate_locked_super(9)deactivate_super(9)grab_super(9)retire_super(9)generic_shutdown_super(9)sget_fc(9)reconfigure_super(9)emergency_thaw_all(9)get_anon_bdev(9)sget_dev(9)fs_bdev_freeze(9)fs_bdev_thaw(9)fs_bdev_file_open_by_dev(9)fs_bdev_file_open_by_path(9)fs_bdev_unregister(9)fs_bdev_file_release(9)get_tree_bdev_flags(9)get_tree_bdev(9)vfs_get_tree(9)sb_wait_write(9)freeze_super(9)thaw_super(9)
like, the whole superblock friend group showed up to the party π«Άπ
mwah π this page lives in ./fs and the version it's serving is October 2026 β go read it again sometime, bestie, it's worth it βπ
π¦ 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