Definitions for a simple block device interface. More...
|A simple block device. More...|
|typedef struct kos_blockdev||kos_blockdev_t|
|A simple block device. |
Definitions for a simple block device interface.
This file contains the definition of a very simple block device that is to be used with filesystems in the kernel. This device interface is designed to abstract away direct hardware access and make it easier to interface the various filesystems that we may add support for to multiple potential devices.
The most common of these devices that people are probably interested in directly would be the Dreamcast SD card reader, and that was indeed the primary impetus to this device structure. However, it could also be used to support a file-based disk image or any number of other devices.
A simple block device.
This structure represents a single block device. Each block device should be associated with exactly one filesystem and is used to actually read the data from the disk (or other device) where it is stored.
By using a block device with any new filesystems, we can abstract away a few things so that filesystems can be used with a variety of different "devices", such as the SD card reader for the Dreamcast or a disk image file of some sort.