grab_super(9)
π grab_super(9) β the kernel API manual, but make it make sense π
okay so bestie, we're in section 9 of the kernel API manual today (yes, the kernel kernel), and the star of the show is grab_super. it's a little function living over in ./fs/super.c and honestly it's giving "bouncer at the club of mounted filesystems" energy. let's get into it π
β¨ NAME β¨
grab_super β acquire an active reference to a superblock. that's it, that's the whole vibe. it grabs. it supers. π₯
πΈ SYNOPSIS πΈ
bool grab_super (struct super_block *sb );
look at her. one argument, returns a bool, no notes. iconic. π
π¦ ARGUMENTS π¦
sbβ the superblock you wanna acquire, bestie. that's the target. π―
π DESCRIPTION π
so here's the tea β β grab_super acquires a temporary reference on a superblock, and then it tries to trade that temp reference for an active reference. like, it's holding a lil placeholder spot in line and hoping the bouncer lets it in for real. no cap.
where does this come up? in sget_fc, that's where. grab_super is used there to wait for a superblock to do one of two things:
- become
SB_BORN(glow up complete β¨), or - pass through
sb->killand get marked asSB_DEAD(rip bozo π)
either way, it's waiting for the superblock to pick a lane. main character energy fr fr. π§
β RETURN β
- returns
trueif an active reference could be acquired π - returns
falseif not π
that's it. binary queen. bool supremacy. π
π SEE ALSO π
the whole friend group, gathered here in ./fs (kernel file ./fs/super.c, to be specific):
super_lock(9)alloc_super(9)deactivate_locked_super(9)deactivate_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)
go read all of them, i'll wait. π«Ά
lowkey a reminder that this whole page lives under ./fs in the kernel tree β that's the directory, bestie, not a suggestion.
and that's the page! π this lil writeup came from ./fs, dated October 2026, and it's the grab_super(9) entry β go off, kernel docs, you ate. πβ¨
π¦ 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