GENHD CAPABILITY FLAGS(9)
π genhd capability flags (9)
okay so this is a Kernel API Manual page, bestie, and it's literally all about the capability flags for genhd β the block-device generation stuff. it's short, it's sweet, and every one of these flags is doing main character work. let's get into it β¨
πΈ DESCRIPTION πΈ
these are the flags that tell the kernel how a block device should behave. three of them, three vibes, all iconic π
GENHD_FL_REMOVABLEβ this one says the block device gives you access to removable media. and here's the tea π΅: when it's set, the device stays present even when there's no media inserted. it's giving "the slot is still there even though the disc isn't." shall not be set for devices that get removed entirely when the media is removed β like, if the whole thing dips when the media goes, this flag is not for you, periodt πGENHD_FL_HIDDENβ the block device is hidden π. it doesn't produce events, it doesn't appear insysfs, and it can't be opened from userspace or by usingblkdev_get*. sneaky little thing. it's used for the underlying components of multipath devices, iykyk πGENHD_FL_NO_PARTβ partition support is disabled π«. the kernel will not scan for partitions fromadd_disk, and users can't add partitions manually either. no partitions, not now, not ever, no cap π
π¦ SEE ALSO π¦
go read these next, bestie, they're all in the kernel file ./include/linux/blkdev.h:
disk_openers(9)disk_has_partscan(9)bio_needs_zone_write_plugging(9)disk_zone_capacity(9)blk_alloc_disk(9)queue_limits_start_update(9)queue_limits_cancel_update(9)bio_end_io_acct(9)
β¨ that's the whole page, you ate that β¨ this one lives under ./include/linux, and the version/date stamp on it is October 2026 π mwah, go touch some block devices (safely) π«Ά
π¦ 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