On 28 October 2010 21:18, Charles Forsyth <fors...@terzarima.net> wrote: > the race is that there's nothing to say that the clunk completes before the > process continues on to do something more, including some action that depends > on the clunk completing, > such as simply repeating the open. that open can fail if the mode or the name > imposes particular constraints; constraints that depend on the order of > events as > expressed by the process.
in practise, there is no race if the tree is being imported via plan9's exportfs(4) because it services clunk requests synchronously. on the other hand inferno's sys-export(2) services all requests (except Tflush) asynchronously, so the race will always be present. when importing a file server directly, the presence of the race will naturally depend on the file server's implementation. so this trick is unsafe in general, but might be ok sometimes.