Changeset 2702 for box/trunk/lib/backupstore/BackupStoreCheck2.cpp
- Timestamp:
- 27/08/2010 10:18:57 (21 months ago)
- File:
-
- 1 edited
-
box/trunk/lib/backupstore/BackupStoreCheck2.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/backupstore/BackupStoreCheck2.cpp
r2481 r2702 574 574 { 575 575 // Attempt to load the existing store info file 576 std::auto_ptr<BackupStoreInfo> p oldInfo;576 std::auto_ptr<BackupStoreInfo> pOldInfo; 577 577 try 578 578 { 579 poldInfo.reset(BackupStoreInfo::Load(mAccountID, mStoreRoot, mDiscSetNumber, true /* read only */).release()); 579 pOldInfo.reset(BackupStoreInfo::Load(mAccountID, mStoreRoot, mDiscSetNumber, true /* read only */).release()); 580 mAccountName = pOldInfo->GetAccountName(); 580 581 } 581 582 catch(...) … … 584 585 ++mNumberErrorsFound; 585 586 } 587 588 BOX_NOTICE("Total files: " << mNumFiles << " (of which " 589 "old files: " << mNumOldFiles << ", " 590 "deleted files: " << mNumDeletedFiles << "), " 591 "directories: " << mNumDirectories); 586 592 587 593 // Minimum soft and hard limits … … 590 596 591 597 // Need to do anything? 592 if(poldInfo.get() != 0 && mNumberErrorsFound == 0 && poldInfo->GetAccountID() == mAccountID) 598 if(pOldInfo.get() != 0 && 599 mNumberErrorsFound == 0 && 600 pOldInfo->GetAccountID() == mAccountID) 593 601 { 594 602 // Leave the store info as it is, no need to alter it because nothing really changed, … … 602 610 int64_t softLimit = minSoft; 603 611 int64_t hardLimit = minHard; 604 if(p oldInfo.get() != 0 && poldInfo->GetBlocksSoftLimit() > minSoft)605 { 606 softLimit = p oldInfo->GetBlocksSoftLimit();612 if(pOldInfo.get() != 0 && pOldInfo->GetBlocksSoftLimit() > minSoft) 613 { 614 softLimit = pOldInfo->GetBlocksSoftLimit(); 607 615 } 608 616 else 609 617 { 610 BOX_WARNING("Soft limit for account changed to ensure housekeeping doesn't delete files on next run."); 611 } 612 if(poldInfo.get() != 0 && poldInfo->GetBlocksHardLimit() > minHard) 613 { 614 hardLimit = poldInfo->GetBlocksHardLimit(); 618 BOX_WARNING("Soft limit for account changed to ensure " 619 "housekeeping doesn't delete files on next run."); 620 } 621 if(pOldInfo.get() != 0 && pOldInfo->GetBlocksHardLimit() > minHard) 622 { 623 hardLimit = pOldInfo->GetBlocksHardLimit(); 615 624 } 616 625 else 617 626 { 618 BOX_WARNING("Hard limit for account changed to ensure housekeeping doesn't delete files on next run."); 627 BOX_WARNING("Hard limit for account changed to ensure " 628 "housekeeping doesn't delete files on next run."); 619 629 } 620 630 … … 629 639 std::auto_ptr<BackupStoreInfo> info(BackupStoreInfo::CreateForRegeneration( 630 640 mAccountID, 641 mAccountName, 631 642 mStoreRoot, 632 643 mDiscSetNumber, 633 644 lastObjID, 634 645 mBlocksUsed, 646 mBlocksInCurrentFiles, 635 647 mBlocksInOldFiles, 636 648 mBlocksInDeletedFiles, … … 638 650 softLimit, 639 651 hardLimit)); 652 info->AdjustNumFiles(mNumFiles); 653 info->AdjustNumOldFiles(mNumOldFiles); 654 info->AdjustNumDeletedFiles(mNumDeletedFiles); 655 info->AdjustNumDirectories(mNumDirectories); 656 657 if(pOldInfo.get()) 658 { 659 mNumberErrorsFound += info->ReportChangesTo(*pOldInfo); 660 } 640 661 641 662 // Save to disc?
Note: See TracChangeset
for help on using the changeset viewer.
