add checkpoints to track obscure crash

This commit is contained in:
Glenn Maynard
2004-01-14 08:13:08 +00:00
parent f226bde635
commit 85e13c0360
+4
View File
@@ -377,15 +377,19 @@ int RageFileObjDirect::Flush()
if( !write_buf.size() ) if( !write_buf.size() )
return 0; return 0;
CHECKPOINT;
int ret = retried_write( fd, write_buf.data(), write_buf.size() ); int ret = retried_write( fd, write_buf.data(), write_buf.size() );
CHECKPOINT;
if( ret == -1 ) if( ret == -1 )
{ {
LOG->Warn("Error writing %s: %s", this->path.c_str(), strerror(errno) ); LOG->Warn("Error writing %s: %s", this->path.c_str(), strerror(errno) );
SetError( strerror(errno) ); SetError( strerror(errno) );
} }
CHECKPOINT;
write_buf.erase(); write_buf.erase();
write_buf.reserve( BUFSIZE ); write_buf.reserve( BUFSIZE );
CHECKPOINT;
return ret; return ret;
} }