On Fri, Jan 15, 2010 at 2:45 PM, Charles Forsyth <fors...@terzarima.net> wrote:
> in the first case, you'll see the last Twrite and then a Tclunk.
> in the second, you'll see the first Twrite and then a Tflush (followed by
> a Tclunk when cat exits).

i don't believe these two cases can be distinguished.
in particular i think you'd only see the Tflush if the first
Twrite was still in flight when you typed DEL.  assuming
the first write had completed before DEL, the two scenarios
are indistinguishable other than the different values being
written.

> at the server end?  I know I read something about this, somewhere, but
> I can't find it now.  It could very well have been buried in some
> source I was reading (about Tflush vs. 0 length Twrites or some
> such?).

wikifs uses a trick to convey errors back at the end of
the file: clients can send a zero-length write before closing
the file, and the zero-length write will fail if the page
cannot be committed.  but i don't recommend this in
general.  it's pretty gross and means, among other things,
that cat is not as useful as a custom client.

russ

Reply via email to