Generic Block Device Capability¶
This file documents the sysfs fileblock/<disk>/capability.
capability is a bitfield, printed in hexadecimal, indicating whichcapabilities a specific block device supports:
genhd capability flags
GENHD_FL_REMOVABLE (0x0001): indicates that the block devicegives access to removable media.When set, the device remains present even when media is notinserted.Must not be set for devices which are removed entirely when themedia is removed.
GENHD_FL_CD (0x0008): the block device is a CD-ROM-styledevice.Affects responses to theCDROM_GET_CAPABILITY ioctl.
GENHD_FL_UP (0x0010): indicates that the block device is “up”,with a similar meaning to network interfaces.
GENHD_FL_SUPPRESS_PARTITION_INFO (0x0020): don’t includepartition information in/proc/partitions or in the output ofprintk_all_partitions().Used for the null block device and some MMC devices.
GENHD_FL_EXT_DEVT (0x0040): the driver supports extendeddynamicdev_t, i.e. it wants extended device numbers(BLOCK_EXT_MAJOR).This affects the maximum number of partitions.
GENHD_FL_NATIVE_CAPACITY (0x0080): based on information in thepartition table, the device’s capacity has been extended to itsnative capacity; i.e. the device has hidden capacity used by oneof the partitions (this is a flag used so that native capacity isonly ever unlocked once).
GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE (0x0100): event polling isblocked whenever a writer holds an exclusive lock.
GENHD_FL_NO_PART_SCAN (0x0200): partition scanning is disabled.Used for loop devices in their default settings and some MMCdevices.
GENHD_FL_HIDDEN (0x0400): the block device is hidden; itdoesn’t produce events, doesn’t appear in sysfs, and doesn’t havean associatedbdev.ImpliesGENHD_FL_SUPPRESS_PARTITION_INFO andGENHD_FL_NO_PART_SCAN.Used for multipath devices.