fs_bdev_file_open_by_dev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 opened
  • holder β€” block-layer exclusivity token: either a superblock, or the file_system_type when the device may be shared by several superblocks of that type πŸ‘‘
  • sb β€” superblock to drive fs_holder_ops events 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:


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