Skip to main content

Module storage

Module storage 

Source
Expand description

Block-device, filesystem, and queue-discovery utilities.

The helpers inspect filesystem metadata and system block-device information. Discovery covers backing device names, software RAID, multi-queue properties, and the filesystem hosting a path.

Discovery reads sysfs under /sys/dev/block/, stats the device through MetadataExt, and calls statfs(2), which not every target provides. Where an interface is missing these functions report no raid or return an unsupported error, so callers need no condition of their own.

Structsยง

MultiDevice
Multi-Device (md) i.e. software raid properties.
MultiQueue
Multi-Queue (mq) characteristics.
Queue
Single-queue characteristics

Enumsยง

Filesystem
Filesystem hosting a path, among those needing special handling.

Functionsยง

block_path ๐Ÿ”’
dev_from_path ๐Ÿ”’
Get the (major, minor) of the block device on which Path is mounted.
filesystem_from_path
Get the filesystem on which Path is mounted, when it needs special handling.
md_discover
Get properties of a MultiDevice (md) storage system
mq_discover ๐Ÿ”’
Get properties of a MultiQueue within a MultiDevice.
name_from_path
Get the name of the block device on which Path is mounted.
queue_discover ๐Ÿ”’
Get properties of a Queue within a MultiQueue.