Blame


1 058b0118 2005-01-03 devnull .TH FLUSH 9P
2 058b0118 2005-01-03 devnull .SH NAME
3 058b0118 2005-01-03 devnull flush \- abort a message
4 058b0118 2005-01-03 devnull .SH SYNOPSIS
5 058b0118 2005-01-03 devnull .ta \w'\fLTflush 'u
6 058b0118 2005-01-03 devnull .IR size [4]
7 058b0118 2005-01-03 devnull .B Tflush
8 058b0118 2005-01-03 devnull .IR tag [2]
9 058b0118 2005-01-03 devnull .IR oldtag [2]
10 058b0118 2005-01-03 devnull .br
11 058b0118 2005-01-03 devnull .IR size [4]
12 058b0118 2005-01-03 devnull .B Rflush
13 058b0118 2005-01-03 devnull .IR tag [2]
14 058b0118 2005-01-03 devnull .SH DESCRIPTION
15 058b0118 2005-01-03 devnull When the response to a request is no longer needed, such as when
16 058b0118 2005-01-03 devnull a user interrupts a process doing a
17 058b0118 2005-01-03 devnull .IR read (9p),
18 058b0118 2005-01-03 devnull a
19 058b0118 2005-01-03 devnull .B Tflush
20 058b0118 2005-01-03 devnull request is sent to the server to purge the pending response.
21 058b0118 2005-01-03 devnull The message being flushed is identified by
22 058b0118 2005-01-03 devnull .IR oldtag .
23 058b0118 2005-01-03 devnull The semantics of
24 058b0118 2005-01-03 devnull .B flush
25 058b0118 2005-01-03 devnull depends on messages arriving in order.
26 058b0118 2005-01-03 devnull .PP
27 058b0118 2005-01-03 devnull The server should answer the
28 058b0118 2005-01-03 devnull .B flush
29 058b0118 2005-01-03 devnull message immediately.
30 058b0118 2005-01-03 devnull If it recognizes
31 058b0118 2005-01-03 devnull .I oldtag
32 058b0118 2005-01-03 devnull as the tag of a pending transaction, it should abort any pending response
33 058b0118 2005-01-03 devnull and discard that tag.
34 058b0118 2005-01-03 devnull In either case, it should respond with an
35 058b0118 2005-01-03 devnull .B Rflush
36 058b0118 2005-01-03 devnull echoing the
37 058b0118 2005-01-03 devnull .I tag
38 058b0118 2005-01-03 devnull (not
39 058b0118 2005-01-03 devnull .IR oldtag )
40 058b0118 2005-01-03 devnull of the
41 058b0118 2005-01-03 devnull .B Tflush
42 058b0118 2005-01-03 devnull message.
43 058b0118 2005-01-03 devnull A
44 058b0118 2005-01-03 devnull .B Tflush
45 058b0118 2005-01-03 devnull can never be responded to by an
46 058b0118 2005-01-03 devnull .B Rerror
47 058b0118 2005-01-03 devnull message.
48 058b0118 2005-01-03 devnull .PP
49 058b0118 2005-01-03 devnull The server may respond to the pending request before
50 058b0118 2005-01-03 devnull responding to the
51 058b0118 2005-01-03 devnull .BR Tflush .
52 058b0118 2005-01-03 devnull It is possible for a client to send multiple
53 058b0118 2005-01-03 devnull .B Tflush
54 058b0118 2005-01-03 devnull messages for a particular pending request. Each
55 058b0118 2005-01-03 devnull subsequent
56 058b0118 2005-01-03 devnull .B Tflush
57 058b0118 2005-01-03 devnull must contain as
58 058b0118 2005-01-03 devnull .I oldtag
59 058b0118 2005-01-03 devnull the tag of the pending request (not a previous
60 058b0118 2005-01-03 devnull .BR Tflush ).
61 058b0118 2005-01-03 devnull Should multiple
62 058b0118 2005-01-03 devnull .BR Tflush es
63 058b0118 2005-01-03 devnull be received for a pending request, they must be answered in
64 058b0118 2005-01-03 devnull order. A
65 058b0118 2005-01-03 devnull .B Rflush
66 058b0118 2005-01-03 devnull for any of the multiple
67 058b0118 2005-01-03 devnull .BR Tflush es
68 058b0118 2005-01-03 devnull implies an answer for all previous ones. Therefore, should
69 058b0118 2005-01-03 devnull a server receive a request and then multiple flushes for that
70 058b0118 2005-01-03 devnull request, it need respond only to the last flush.
71 058b0118 2005-01-03 devnull .PP
72 058b0118 2005-01-03 devnull When the client sends a
73 058b0118 2005-01-03 devnull .BR Tflush ,
74 058b0118 2005-01-03 devnull it must wait to receive the corresponding
75 058b0118 2005-01-03 devnull .B Rflush
76 058b0118 2005-01-03 devnull before reusing
77 058b0118 2005-01-03 devnull .I oldtag
78 058b0118 2005-01-03 devnull for subsequent messages.
79 058b0118 2005-01-03 devnull If a response to the flushed request is received before the
80 058b0118 2005-01-03 devnull .BR Rflush ,
81 058b0118 2005-01-03 devnull the client must honor the response
82 058b0118 2005-01-03 devnull as if it had not been flushed,
83 058b0118 2005-01-03 devnull since the completed request may signify a state change in the server.
84 058b0118 2005-01-03 devnull For instance,
85 058b0118 2005-01-03 devnull .B Tcreate
86 058b0118 2005-01-03 devnull may have created a file and
87 058b0118 2005-01-03 devnull .B Twalk
88 058b0118 2005-01-03 devnull may have allocated a fid.
89 058b0118 2005-01-03 devnull If no response is received before the
90 058b0118 2005-01-03 devnull .BR Rflush ,
91 058b0118 2005-01-03 devnull the flushed transaction is considered to have been canceled,
92 058b0118 2005-01-03 devnull and should be treated as though it had never been sent.
93 058b0118 2005-01-03 devnull .PP
94 058b0118 2005-01-03 devnull Several exceptional conditions are handled correctly by the above specification:
95 058b0118 2005-01-03 devnull sending multiple flushes for a single tag,
96 058b0118 2005-01-03 devnull flushing after a transaction is completed,
97 058b0118 2005-01-03 devnull flushing a
98 058b0118 2005-01-03 devnull .BR Tflush ,
99 058b0118 2005-01-03 devnull and flushing an invalid tag.
100 058b0118 2005-01-03 devnull .SH ENTRY POINTS
101 058b0118 2005-01-03 devnull The
102 36cd4c58 2021-01-30 crossd .MR 9pclient (3)
103 058b0118 2005-01-03 devnull library does not generate
104 058b0118 2005-01-03 devnull .B flush
105 058b0118 2005-01-03 devnull transactions..
106 36cd4c58 2021-01-30 crossd .MR 9pserve (4)
107 058b0118 2005-01-03 devnull generates
108 058b0118 2005-01-03 devnull .B flush
109 058b0118 2005-01-03 devnull transactions to cancel transactions pending when a client hangs up.