Ticket #19: bbackupd-soft-limit-check.2.patch
| File bbackupd-soft-limit-check.2.patch, 1.1 KB (added by gniemcew, 5 years ago) |
|---|
-
bin/bbackupd/BackupClientContext.cpp
167 167 ::syslog(LOG_INFO, "Connection made, login successful"); 168 168 169 169 // Check to see if there is any space available on the server 170 int64_t softLimit = loginConf->GetBlocksSoftLimit(); 171 int64_t hardLimit = loginConf->GetBlocksHardLimit(); 172 // Threshold for uploading new stuff 173 int64_t stopUploadThreshold = softLimit + ((hardLimit - softLimit) / 3); 174 if(loginConf->GetBlocksUsed() > stopUploadThreshold) 170 if(loginConf->GetBlocksUsed() >= loginConf->GetBlocksHardLimit()) 175 171 { 176 172 // no -- flag so only things like deletions happen 177 173 mStorageLimitExceeded = true; 178 174 // Log 179 ::syslog(LOG_WARNING, "Exceeded storage limitson server -- not uploading changes to files");175 ::syslog(LOG_WARNING, "Exceeded storage hard-limit on server -- not uploading changes to files"); 180 176 } 181 177 } 182 178 catch(...)
