[Box Backup-commit] COMMIT r1333 - box/chris/general/bin/bbstored

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Mar 3 22:10:03 GMT 2007


Author: chris
Date: 2007-03-03 22:10:03 +0000 (Sat, 03 Mar 2007)
New Revision: 1333

Modified:
   box/chris/general/bin/bbstored/BackupCommands.cpp
Log:
Use buffered streams when verifying files to reduce I/O (from chris/merge)


Modified: box/chris/general/bin/bbstored/BackupCommands.cpp
===================================================================
--- box/chris/general/bin/bbstored/BackupCommands.cpp	2007-03-03 22:09:23 UTC (rev 1332)
+++ box/chris/general/bin/bbstored/BackupCommands.cpp	2007-03-03 22:10:03 UTC (rev 1333)
@@ -30,6 +30,7 @@
 #include "RaidFileController.h"
 #include "FileStream.h"
 #include "InvisibleTempFileStream.h"
+#include "BufferedStream.h"
 
 #include "MemLeakFindOn.h"
 
@@ -388,9 +389,10 @@
 	
 		// Open the object
 		std::auto_ptr<IOStream> object(rContext.OpenObject(mObjectID));
+		BufferedStream buf(*object);
 		
 		// Verify it
-		if(!BackupStoreFile::VerifyEncodedFileFormat(*object))
+		if(!BackupStoreFile::VerifyEncodedFileFormat(buf))
 		{
 			return std::auto_ptr<ProtocolObject>(new BackupProtocolServerError(
 				BackupProtocolServerError::ErrorType, BackupProtocolServerError::Err_FileDoesNotVerify));			




More information about the Boxbackup-commit mailing list