fs_bdev_file_open_by_dev(9)
π fs_bdev_file_open_by_dev(9) π
okay bestie, welcome to the Kernel API Manual page for fs_bdev_file_open_by_dev β itβs giving βblock device claimed on behalf of a superblockβ energy, and weβre gonna get into it π
β¨ NAME β¨
fs_bdev_file_open_by_dev β claim a block device on behalf of a superblock π
πΈ SYNOPSIS πΈ
struct file * fs_bdev_file_open_by_dev (dev_t dev , blk_mode_t mode ,
void *holder , struct super_block *sb );
π ARGUMENTS π
devβ block device number, literally the deviceβs digits bestie π’modeβ open mode, the whole vibe of how it gets openedholderβ block-layer exclusivity token: either a superblock, or thefile_system_typewhen the device may be shared by several superblocks of that type πsbβ superblock to drivefs_holder_opsevents for
π¦ DESCRIPTION π¦
Open dev with fs_holder_ops and register that sb uses it, so device removal/sync/freeze/thaw are propagated to sb β and to any other superblock sharing dev too, periodt π
must be paired with fs_bdev_file_release β no ghosting this one, bestie π
β RETURN β
an opened block-device file or an ERR_PTR β thatβs the whole return vibe π«Ά
π₯ SEE ALSO π₯
Kernel file ./fs/super.c β and the whole cross-ref crew:
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_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)
mwah π β this cutie comes from source ./fs, dated October 2026, and itβs literally titled fs_bdev_file_open_by_dev(9) ππ¦
π¦ 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