diff -r 41f0cfe18c80 -r c734af59ce98 userlibandfileserver/fileserver/sfile/sf_file_cache.cpp --- a/userlibandfileserver/fileserver/sfile/sf_file_cache.cpp Tue Apr 27 18:02:57 2010 +0300 +++ b/userlibandfileserver/fileserver/sfile/sf_file_cache.cpp Tue May 11 17:28:22 2010 +0300 @@ -1503,6 +1503,11 @@ // Need to reset currentOperation.iReadWriteArgs.iTotalLength here to make sure // TFsFileWrite::PostInitialise() doesn't think there's no data left to process aMsgRequest.ReStart(); + + //Need to preserve the current state otherwise if we are over the ram threshold + //the request can end up in a livelock trying to repeatedly flush. + currentOperation->iState = EStWriteThrough; + if (r == CFsRequest::EReqActionBusy || r != CFsRequest::EReqActionComplete) return r; }