Skip to content

BlockDeviceOperations

Defined in: src/fs/block_dev.ts:111

The operations a block device driver provides, like Linux’s struct block_device_operations.

Linux moves data with submit_bio rather than reads and writes, since everything goes through the page cache. We have no page cache to speak of, so these look like a character device’s except that offsets are always relative to the whole disk, since partitions are remapped before they get here.

optional dev_node?: (disk) => DevNode | undefined

Defined in: src/fs/block_dev.ts:117

GenDisk

DevNode | undefined


optional ioctl?: Record<number, DeviceIoctl>

Defined in: src/fs/block_dev.ts:118


optional open?: (file) => void

Defined in: src/fs/block_dev.ts:112

DeviceFile

void


optional read?: (file, buffer, start, end) => void

Defined in: src/fs/block_dev.ts:114

DeviceFile

Uint8Array

number

number

void


optional release?: (file) => void

Defined in: src/fs/block_dev.ts:113

DeviceFile

void


optional sync?: (file) => void

Defined in: src/fs/block_dev.ts:116

DeviceFile

void


optional write?: (file, buffer, offset) => void

Defined in: src/fs/block_dev.ts:115

DeviceFile

Uint8Array

number

void