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