Sched fix from Walt Gribben: have scheduler defaults for disk

space prefs agree with web page.  Bruce's note: this may require
further fixes for two cases.  First, if the project prefs are
not the same as BOINC defaults.  Second, if the user doesn't want
BOINC to leave any disk space free and on their web preference page
sets 'leave X bytes free' to zero, then this patch will assume they
mean 100MB.  But I'm still applying the patch 'cause Walt says that
this is keeping lots of new users from getting work.

svn path=/trunk/boinc/; revision=8954
This commit is contained in:
Bruce Allen 2005-11-26 12:35:28 +00:00
parent 6f792ba82e
commit 7f2d5cfa06
2 changed files with 19 additions and 3 deletions

View File

@ -13950,3 +13950,17 @@ Rom 26 Nov 2005
locale/en_US/
BOINC Manager.po
BOINC Manager.mo
Bruce 26 Nov 2005
- Sched fix from Walt Gribben: have scheduler defaults for disk
space prefs agree with web page. Bruce's note: this may require
further fixes for two cases. First, if the project prefs are
not the same as BOINC defaults. Second, if the user doesn't want
BOINC to leave any disk space free and on their web preference page
sets 'leave X bytes free' to zero, then this patch will assume they
mean 100MB. But I'm still applying the patch 'cause Walt says that
this is keeping lots of new users from getting work.
sched/
sched_send.C

View File

@ -120,9 +120,11 @@ double max_allowable_disk(SCHEDULER_REQUEST& req, SCHEDULER_REPLY& reply) {
// fill in default values for missing prefs
//
if (prefs.disk_max_used_gb == 0) prefs.disk_max_used_gb = 0.1; // 100 MB
if (prefs.disk_max_used_pct == 0) prefs.disk_max_used_pct = 10;
// min_free_gb can be zero
if (prefs.disk_max_used_gb == 0) prefs.disk_max_used_gb = 100.0; // 100 GB
if (prefs.disk_max_used_pct == 0) prefs.disk_max_used_pct = 50; // 50%
// FIXME: if user wants to set min_free_gb to zero (this is allowed) then
// the web page interface needs to set it to a small value, eg 1.e-6.
if (prefs.disk_min_free_gb == 0) prefs.disk_min_free_gb = 0.1 // 100 MB
// no defaults for total/free disk space (host.d_total, d_free)
// if they're zero, client will get no work.