Skip to main content

Module blkdev

Module blkdev 

Source
Expand description

§Block device ioctls: BLKGETSIZE64, BLKDISCARD

Standard Linux block device ioctls that are not btrfs-specific but are needed for device preparation (e.g. querying device size, issuing TRIM).

Functions§

blk_discard
blk_getsize64
device_size
Get the size of a block device in bytes.
discard_range
Issue a BLKDISCARD (TRIM) on the given byte range of a block device.
discard_whole_device
Issue a BLKDISCARD on the entire block device.