-
Notifications
You must be signed in to change notification settings - Fork 1
KernelDiskIO
See disk.h, disk_q.h and pager_io_req.h for reference.
Basic disk io is asyncronous and is handled with the help of pager_io_request structure, which represents one io request to one device (or partition).
This function enqueues request for input/output and returns ASAP. As soon as io is done, callback function (pager_io_request.pager_callback) is called with request passed.
There are more entry points for secondary operations:
Attempt to dequeue request from disk io queue. Can fail if request is being handled or already done.
Attempt to requeue request to be handled ASAP. Can fail.
NB! Not completely implemented, check sources. Do not return until all previous requests for this device are done.
NB! Not yet implemented, check sources. Inform device that this block does not contain any information that is needed any more. Critical for SSD disks.
This structure represents an asyncronous block io request.
Call to prepare/clean request.
physaddr_t phys_page; // physmem address
disk_page_no_t disk_page; // disk address in blocks (4096 bytes usually)
unsigned char flag_pagein; // Read
unsigned char flag_pageout; // Write
void (*pager_callback)( struct pager_io_request *req, int write );
errno_t rc; // Driver return codeEach physical block device or logical part of such device (partition) is described with such a structure.
:: Home :: RoadMap :: History :: ChangeLog :: ScreenShots :: Phantom Developer's Guide