shithub: 9ferno

ref: e16b4d85dd6b1cf14834387b765113114dabeae2
dir: /man/5/flush/

View raw version
flush \- abort a message
.ta \w'\fLTflush 'u
.IR size [4]
.B Tflush
.IR tag [2]
.IR oldtag [2]
.IR size [4]
.B Rflush
.IR tag [2]
When the response to a request is no longer needed, such as when
a user interrupts a process doing a
.IR sys-read (2),
.B Tflush
request is sent to the server to purge the pending response.
The message being flushed is identified by
.IR oldtag .
The semantics of
.B flush
depends on messages arriving in order.
The server should answer the
.B flush
message immediately.
If it recognizes
.I oldtag
as the tag of a pending transaction, it should abort any pending response
and discard that tag.
In either case, it should respond with an
.B Rflush
echoing the
.I tag
.IR oldtag )
of the
.B Tflush
.B Tflush
can never be responded to by an
.B Rerror
The server may respond to the pending request before
responding to the
.BR Tflush .
It is possible for a client to send multiple
.B Tflush
messages for a particular pending request.  Each
.B Tflush
must contain as
.I oldtag
the tag of the pending request (not a previous
.BR Tflush ).
Should multiple
.BR Tflush es
be received for a pending request, they must be answered in
order.  An
.B Rflush
for any of the multiple
.BR Tflush es
implies an answer for all previous ones.  Therefore, should
a server receive a request and then multiple flushes for that
request, it need respond only to the last flush.
When the client sends a 
.BR Tflush ,
it must wait to receive the corresponding
.B Rflush
before reusing
.I oldtag
for subsequent messages.
If a response to the flushed request is received before the
.BR Rflush ,
the client must honor the response
as if it had not been flushed,
since the completed request may signify a state change in the server.
For instance,
.B Tcreate
may have created a file and
.B Twalk
may have allocated a fid.
If no response is received before the
.BR Rflush ,
the flushed transaction is considered to have been cancelled,
and should be treated as though it had never been sent.
Several exceptional conditions are handled correctly by the above specification:
sending multiple flushes for a single tag,
flushing after a transaction is completed,
flushing a
.BR Tflush ,
and flushing an invalid tag.
.IR sys-read (2)