Age | Commit message (Collapse) | Author |
|
This commit implements the concept of virtual blocks which may be bigger
than the hardware block size (e.g., 512 bytes). The virtual block size
must be a multiple of the hardware blocksize. The system will panic if
this condition is not met.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The number of disks registered within the system should not exceed the
DISK_MAX limit. Log an error and bail if that happens.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces the initial Hyra disk management framework. The
goal of this framework is to provide a simplistic API for the management
of storage devices in a way that is more suitable for complex operations.
Upon detection and initialization of a block-based storage medium, the
driver may create a named disk object using the 'disk_add()' function.
Disks that have been registered with the system may be acquired via the
'disk_get_id()' function.
As of the current revision, each disk is given a monotonically incremental
ID for identification and lookups. A disk ID of zero indicates a primary disk
on the system.
Disks may be written to or read from using the 'disk_read()' and 'disk_write()'
functions. Memory buffers used for these operations must be created with the
'disk_buf_alloc()' function and freed with the 'disk_buf_free()' function.
Signed-off-by: Ian Moffett <ian@osmora.org>
|