|
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>
|