get_tree_bdev_flags(9)
πΈ get_tree_bdev_flags(9) πΈ
okay so first things first, we're in the Kernel API Manual bestie, and today's main character is get_tree_bdev_flags π
which is literally the function that gets you a superblock based on a single block device. one device. no cap. π
β¨ NAME β¨
get_tree_bdev_flags β get a superblock based on a single block device π¦
β¨ SYNOPSIS β¨
int get_tree_bdev_flags (struct fs_context *fc , int
(*fill_super)(struct super_block *sb, struct fs_context *fc) , unsigned
int flags );
like, it returns an int, okay? don't come for me about the spacing, that's just how it is π
β¨ ARGUMENTS β¨
fcβ the filesystem context holding the parameters π think of it as the little purse where all the setup details live.fill_superβ helper to initialise a new superblock β¨ it's a function pointer, and its signature is literallyint (*fill_super)(struct super_block *sb, struct fs_context *fc), so it takes the shiny newsband thefcalong with it.flagsβ theGET_TREE_BDEV_*flags π asterisk and all, it's a whole family, not just one flag, iykyk.
β¨ SEE ALSO β¨
Kernel file ./fs/super.c is where it's all at, and it's giving the entire extended friend group π:
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)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(9)vfs_get_tree(9)sb_wait_write(9)freeze_super(9)thaw_super(9)
that's the whole group chat, fr fr ππ
okay that's the page!! it lives in./fs, version vibes from October 2026, and it goes byget_tree_bdev_flags(9)β mwah, slay, periodt π ππ«Ά
π¦ 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