[OpenAFS] Cache file status after Network error

Tom Fitzgerald tfitz@MIT.EDU
Thu, 27 Mar 2008 13:11:17 -0400

> > A write error might be caused by a failure in the communication
> > path between the client and the file server.  Such a failure should not
> > result in the data being discarded from the cache.  
> So we just told the user (by returning error on the close) that the
> file is bad, but subsequent reads should proceed as everything went
> fine? If we can guarantee to obain consistency at a later point, the
> close should not have returned failiure in the first place. You can't
> have it both ways. Until someone implements disconnected AFS and fixes
> the writeback later, I suggest to throw away the data which never will
> make it to the server.

I have to agree with this....  once enough time has gone by that
the server could have accepted writes from a different client,
the disconnected client should invalidate the data.  It shouldn't
return data to its own applications that it knows isn't on the
server and might have been written on the server by other clients. 

The application that wrote the data knows it failed, so cleaning
up is an application-layer problem, not a filesystem problem.