-
Notifications
You must be signed in to change notification settings - Fork 60
/
trfs.txt
executable file
·99 lines (64 loc) · 1.5 KB
/
trfs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
TRFS - trivial remote file system, quick and dirty product of dz@dz.ru :)
Port is 2052, near NFS, but unused.
Simplest thing to page across network. Runs on UDP or TCP. Any packet
is retransmitted if no reply received. Newer request replaces older
even if no reply is received.
SessionId - 64 bit net order, generated by server on startup,
verified on each rq/reply, used to find out that server was restarted
and disk ids are, possiblly, invalid - client has to renegotiate by
doing FindRQ
FileId - 32 bit net order, just like unix file descriptor.
IoId - 32 bit net order, io request id to distinguish two subsequent
io operations on the same block(s).
NSectors - 32 bit net order, number of 512 bype sectors to transfer
StartSector - 64 bit net order, number of 512 bype sector to start io from
NOP
------
SessionId
Error
------
SessionId
ErrorId - int32
ErrorTextLen - int32, bytes in ErrorText
ErrorText -
FindRQ
------
SessionId - ignored!
fileNameLen - int32
file name
FindReply
------
SessionId
FileId
ReadRQ
------
SessionId
NRequests - following 4 fields are repeated this number of times
FileId
IoId
NSectors
StartSector
....
ReadReply
------
SessionId
FileId
IoId
NSectors
StartSector
data (512*n_pages bytes)
WriteRQ
------
SessionId
FileId
IoId
NSectors
StartSector
data (512*n_pages bytes)
WriteAck
------
SessionId
FileId
IoId - same as in RQ we replying to
NSectors
StartSector