[Box Backup-commit] COMMIT r3135 - box/trunk/lib/backupstore

subversion at boxbackup.org subversion at boxbackup.org
Wed Nov 7 23:14:01 GMT 2012


Author: chris
Date: 2012-11-07 23:14:01 +0000 (Wed, 07 Nov 2012)
New Revision: 3135

Modified:
   box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp
Log:
Remove commented-out method copied from BackupStoreInfo and not used.


Modified: box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp
===================================================================
--- box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp	2012-11-07 19:59:44 UTC (rev 3134)
+++ box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp	2012-11-07 23:14:01 UTC (rev 3135)
@@ -162,89 +162,6 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    BackupStoreRefCountDatabase::Save()
-//		Purpose: Save modified info back to disc
-//		Created: 2003/08/28
-//
-// --------------------------------------------------------------------------
-/*
-void BackupStoreRefCountDatabase::Save()
-{
-	// Make sure we're initialised (although should never come to this)
-	if(mFilename.empty() || mAccount.GetID() == 0)
-	{
-		THROW_EXCEPTION(BackupStoreException, Internal)
-	}
-
-	// Can we do this?
-	if(mReadOnly)
-	{
-		THROW_EXCEPTION(BackupStoreException, StoreInfoIsReadOnly)
-	}
-	
-	// Then... open a write file
-	RaidFileWrite rf(mAccount.GetDiscSet(), mFilename);
-	rf.Open(true);		// allow overwriting
-	
-	// Make header
-	info_StreamFormat hdr;
-	hdr.mMagicValue 			= htonl(INFO_MAGIC_VALUE);
-	hdr.mAccountID 				= htonl(mAccountID);
-	hdr.mClientStoreMarker			= box_hton64(mClientStoreMarker);
-	hdr.mLastObjectIDUsed			= box_hton64(mLastObjectIDUsed);
-	hdr.mBlocksUsed 				= box_hton64(mBlocksUsed);
-	hdr.mBlocksInOldFiles 			= box_hton64(mBlocksInOldFiles);
-	hdr.mBlocksInDeletedFiles 		= box_hton64(mBlocksInDeletedFiles);
-	hdr.mBlocksInDirectories		= box_hton64(mBlocksInDirectories);
-	hdr.mBlocksSoftLimit			= box_hton64(mBlocksSoftLimit);
-	hdr.mBlocksHardLimit			= box_hton64(mBlocksHardLimit);
-	hdr.mCurrentMarkNumber			= 0;
-	hdr.mOptionsPresent				= 0;
-	hdr.mNumberDeletedDirectories	= box_hton64(mDeletedDirectories.size());
-	
-	// Write header
-	rf.Write(&hdr, sizeof(hdr));
-	
-	// Write the deleted object list
-	if(mDeletedDirectories.size() > 0)
-	{
-		int64_t objs[NUM_DELETED_DIRS_BLOCK];
-		
-		int tosave = mDeletedDirectories.size();
-		std::vector<int64_t>::iterator i(mDeletedDirectories.begin());
-		while(tosave > 0)
-		{
-			// How many in this one?
-			int b = (tosave > NUM_DELETED_DIRS_BLOCK)?NUM_DELETED_DIRS_BLOCK:((int)(tosave));
-			
-			// Add them
-			for(int t = 0; t < b; ++t)
-			{
-				ASSERT(i != mDeletedDirectories.end());
-				objs[t] = box_hton64((*i));
-				i++;
-			}
-
-			// Write			
-			rf.Write(objs, b * sizeof(int64_t));
-			
-			// Number saved
-			tosave -= b;
-		}
-	}
-
-	// Commit it to disc, converting it to RAID now
-	rf.Commit(true);
-	
-	// Mark is as not modified
-	mIsModified = false;
-}
-*/
-
-
-// --------------------------------------------------------------------------
-//
-// Function
 //		Name:    BackupStoreRefCountDatabase::GetRefCount(int64_t
 //			 ObjectID)
 //		Purpose: Get the number of references to the specified object




More information about the Boxbackup-commit mailing list