haiku/docs/develop/kits/storage/DiskDeviceAPI_Protocols
Augustin Cavalier e81a954787 docs/develop: Mass directory restructure.
Now vaguely follows the tree structure of "src", with the exception of
directories that described subsystems spanning more than one "kit" or
"server" (e.g. "media", "midi", "bluetooth") -- these have been left as their
own top-level directory within docs/develop.
2018-01-10 16:12:14 -05:00

91 lines
2.5 KiB
Plaintext

Disk Device Protocols
=====================
disk device job scheduled message
target: Registered job update BMessengers
message: B_DISK_DEVICE_JOB_SCHEDULED
"job_id": B_INT32_TYPE
reply: none (asynchronous message)
message fields:
- job_id: Unique job identifier
-----------------------------------------------------------------------
disk device job initiated message
target: Registered job update BMessengers
message: B_DISK_DEVICE_JOB_INITIATED
"job_id": B_INT32_TYPE
reply: none (asynchronous message)
message fields:
- job_id: Unique job identifier
-----------------------------------------------------------------------
disk device job canceled message
target: Registered job update BMessengers
message: B_DISK_DEVICE_JOB_CANCELED
"job_id": B_INT32_TYPE
reply: none (asynchronous message)
message fields:
- job_id: Unique job identifier
-----------------------------------------------------------------------
disk device job finished message
target: Registered job update BMessengers
message: B_DISK_DEVICE_JOB_FINISHED
"job_id": B_INT32_TYPE
"succeeded": B_BOOL_TYPE
[ "info": B_STRING_TYPE ]
reply: none (asynchronous message)
message fields:
- job_id: Unique job identifier
- info: Optional description of success or failure
notes:
A separate job finished message is needed, as rounding error in
the computation of job progress may result in multiple
B_DISK_DEVICE_JOB_UPDATE messages with "progress" fields of 100.
-----------------------------------------------------------------------
disk device job simple progress update message
target: Registered job simple progress update BMessengers
message: B_DISK_DEVICE_JOB_SIMPLE_PROGRESS
"job_id": B_INT32_TYPE
"progress": B_UINT8_TYPE
"info": B_STRING_TYPE
reply: none (asynchronous message)
message fields:
- job_id: Unique job identifier
- progress: Percent of job completed (0 to 100)
- info: Description of current action being taken, i.e.
"allocating inodes", "writing superblock", etc.
-----------------------------------------------------------------------
disk device job extra progress update message
target: Registered job extra progress update BMessengers
message: B_DISK_DEVICE_JOB_EXTRA_PROGRESS
"job_id": B_INT32_TYPE
"info": B_STRING_TYPE
reply: none (asynchronous message)
message fields:
- job_id: Unique job identifier
- info: Extended progress info string, i.e. "block 123: found
invalid inode; fixing"
-----------------------------------------------------------------------