Generic Block Device Capability

This file documents the sysfs file block/<disk>/capability.

capability is a bitfield, printed in hexadecimal, indicating which capabilities a specific block device supports:

genhd capability flags

GENHD_FL_REMOVABLE: indicates that the block device gives access to removable media. When set, the device remains present even when media is not inserted. Shall not be set for devices which are removed entirely when the media is removed.

GENHD_FL_HIDDEN: the block device is hidden; it doesn’t produce events, doesn’t appear in sysfs, and can’t be opened from userspace or using blkdev_get*. Used for the underlying components of multipath devices.

GENHD_FL_NO_PART: partition support is disabled. The kernel will not scan for partitions from add_disk, and users can’t add partitions manually.


allocate a gendisk structure



numa node to allocate on


Allocate and pre-initialize a gendisk structure for use with BIO based drivers.


can sleep