xref: /haiku/docs/develop/kits/storage/DiskDeviceAPI_Protocols (revision b31cb92f29fe89eaca84d173d0f70d38bf0c6a3d)
1Disk Device Protocols
2=====================
3
4disk device job scheduled message
5
6target:		Registered job update BMessengers
7message:	B_DISK_DEVICE_JOB_SCHEDULED
8			"job_id": B_INT32_TYPE
9reply:      none (asynchronous message)
10
11message fields:
12- job_id: Unique job identifier
13
14-----------------------------------------------------------------------
15
16disk device job initiated message
17
18target:		Registered job update BMessengers
19message:	B_DISK_DEVICE_JOB_INITIATED
20			"job_id": B_INT32_TYPE
21reply:      none (asynchronous message)
22
23message fields:
24- job_id: Unique job identifier
25
26-----------------------------------------------------------------------
27
28disk device job canceled message
29
30target:		Registered job update BMessengers
31message:	B_DISK_DEVICE_JOB_CANCELED
32			"job_id": B_INT32_TYPE
33reply:      none (asynchronous message)
34
35message fields:
36- job_id: Unique job identifier
37
38-----------------------------------------------------------------------
39
40disk device job finished message
41
42target:		Registered job update BMessengers
43message:	B_DISK_DEVICE_JOB_FINISHED
44			"job_id": B_INT32_TYPE
45			"succeeded": B_BOOL_TYPE
46			[ "info": B_STRING_TYPE ]
47reply:      none (asynchronous message)
48
49message fields:
50- job_id: Unique job identifier
51- info: Optional description of success or failure
52
53notes:
54A separate job finished message is needed, as rounding error in
55the computation of job progress may result in multiple
56B_DISK_DEVICE_JOB_UPDATE messages with "progress" fields of 100.
57
58-----------------------------------------------------------------------
59
60disk device job simple progress update message
61
62target:		Registered job simple progress update BMessengers
63message:	B_DISK_DEVICE_JOB_SIMPLE_PROGRESS
64			"job_id": B_INT32_TYPE
65			"progress": B_UINT8_TYPE
66			"info": B_STRING_TYPE
67reply:      none (asynchronous message)
68
69message fields:
70- job_id: Unique job identifier
71- progress: Percent of job completed (0 to 100)
72- info: Description of current action being taken, i.e.
73        "allocating inodes", "writing superblock", etc.
74
75-----------------------------------------------------------------------
76
77disk device job extra progress update message
78
79target:		Registered job extra progress update BMessengers
80message:	B_DISK_DEVICE_JOB_EXTRA_PROGRESS
81			"job_id": B_INT32_TYPE
82			"info": B_STRING_TYPE
83reply:      none (asynchronous message)
84
85message fields:
86- job_id: Unique job identifier
87- info: Extended progress info string, i.e. "block 123: found
88        invalid inode; fixing"
89
90-----------------------------------------------------------------------
91