Expand description
Block-device scheme : exposes raw disk devices under /dev.
§Namespace layout
/dev/ : directory listing (this scheme root)
/dev/sda : first SATA disk (AHCI port 0), raw byte-addressable§I/O model
The AHCI driver operates on 512-byte sectors. This scheme accepts arbitrary byte offsets and lengths and performs the necessary sector-aligned read/modify/write internally using a stack-allocated 512-byte bounce buffer.
§VFS wiring
BlkDevScheme implements the kernel Scheme trait so it can be mounted
with vfs::mount::mount("/dev", Arc::new(BlkDevScheme)) during vfs::init().
Structs§
- BlkDev
Scheme - Kernel scheme that serves raw block devices as files under
/dev.
Constants§
- FID_
NULL 🔒 - FID_
RANDOM 🔒 - FID_
ROOT 🔒 - FID_SDA 🔒
- FID_
URANDOM 🔒 - FID_VDA 🔒
- FID_
ZERO 🔒 - RDEV_
NULL 🔒 - RDEV_
RANDOM 🔒 - RDEV_
SDA 🔒 - RDEV_
URANDOM 🔒 - RDEV_
VDA 🔒 - RDEV_
ZERO 🔒
Statics§
Functions§
- prng_
fill 🔒 - Performs the prng fill operation.
- sector_
read 🔒 - Read
buf.len()bytes from the block device starting at byteoffset. - sector_
write 🔒 - Write
databytes to the block device starting at byteoffset. - try_
direct_ 🔒async_ request