alloc_super(9)
π alloc_super(9) β like, the Kernel API Manual page, bestie β¨
okay so real talk, this is alloc_super from the (9) section of the Kernel API Manual β that's the little number up in the corner, it just means "kernel function, not a command you type in your shell" πβ¨
π NAME π
alloc_super β creates a shiny new superblock π
β¨ SYNOPSIS β¨
struct super_block * alloc_super (struct file_system_type *type , int
flags , struct user_namespace *user_ns );
that's the whole signature, no cap β three args, returns a pointer to struct super_block π«Ά
πΈ ARGUMENTS πΈ
typeβ the filesystem type that this superblock is supposed to belong to ποΈflagsβ the mount flags, yep those flags π©user_nsβ the user namespace for thesuper_blockπ€
π¦ DESCRIPTION π¦
so what it does: it allocates and initializes a brand new struct super_block for you β allocate, initialize, done, iconic π
alloc_super hands you back a pointer to the fresh new superblock, or NULL if the allocation had failed π (that's your vibe check: NULL = it did not slay, it flopped).
fr fr, always check for NULL, bestie. allocation can just say no π
π SEE ALSO π
Kernel file ./fs/super.c β and honestly the whole superblock friend group π«Ά:
super_lock(9)deactivate_locked_super(9)deactivate_super(9)grab_super(9)retire_super(9)generic_shutdown_super(9)sget_fc(9)iterate_supers_type(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)
and that's the page, mwah π this little beauty lives over in ./fs and it was dated October 2026 β so yeah, go off, future manpage π
β¨ ily, now go allocate something responsibly π§π
π¦ 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