[Stormdos-develop] NEW DRIVERS/DEVICES MODEL and test
Status: Planning
Brought to you by:
exhu
From: Juras <yb...@tu...> - 2004-04-14 12:19:29
|
Hello stormdos-develop, Post to this mail list for test purpose. New: DRIVERS/DEVICES model Drivers register virtual devices. a device may be of various types (and are handled as separate arrays to maximize search speed): - character and block - volume (which can be mapped as disk c:, d: etc. i.e. it may be referenced in the path, has FS) - special (no file i/o, invisible to user FS functions) - file system (invisible to user file functions) * aliases and substitutes - respect to every category An alias is a device which really refers to the same functionality device but with another name. e.g. C: is a real volume and c: refers to C: and is an alias. A substitute is a device which doesn't directly correspond to another one but sends modified requests to a linked device. e.g. G: is a substituted volume, it modifies requests' path name to be C:\myrefdir\sss\... A volume is a device which accepts file IO operations and serves as a basis, e.g. C:\mypath\myfile.txt It has a block and file system devices attached. A file system device has nothing downward attached, it is used by volumes. A block device has nothing downward attached, it is used by volumes and supports I/O operations. A character device is almost the same as a block device but can't contain a file system. A FS layer may operate on volumes and character/block devices only. If a path contains a colon or slahes then only volumes are operated. 1) initialize FS drivers (they simply register devices) 2) initialize block/char drivers 3) automount all block devices which can contain a FS ---------------------- All devices could be sent a FLUSH request when closing the kernel etc. Character device requests: 1) handle=open() 2) close() 3) eof() 4) filelength 5) read 6) write 7) flush 8) seek Block device requests: 1) handle=open() 2) close() 3) eof 4) blocks_count 5) readblock 6) writeblock 7) readblocks 8) writeblocks 9) seek_block 10) eof 11) [format] 12) block_dev_info Volume device requests (mainly resends them to FS device, serves as a named filter/router): 1) fhandle=file_open 2) file_close 3) file_seek 4) file_read 5) file_write 6) file_eof 7) file_findfirst 8) file_findnext 9) file_rename 10) file_move 11) file_delete 12) file_info 13) volume_info 14) volume_changed 15) volume_remount File system device requests: 0) handle=mount(blockdev) 1) fhandle=file_open 2) file_close 3) file_seek 4) file_read 5) file_write 6) file_eof 7) file_findfirst 8) file_findnext 9) file_rename 10) file_move 11) file_delete 12) file_info 13) volume_info 14) unmount(handle) -- Best regards, Juras mailto:yb...@tu... |