mirror of https://github.com/BOINC/boinc.git
- client, scheduler: there were a few places where we had 1e9
instead of 1 gig (2^20) svn path=/trunk/boinc/; revision=16387
This commit is contained in:
parent
719921bfaf
commit
15b58e582d
|
@ -8979,3 +8979,12 @@ David 1 Nov 2008
|
|||
client/
|
||||
client_types.h
|
||||
rr_sim.cpp
|
||||
|
||||
David 1 Nov 2008
|
||||
- client, scheduler: there were a few places where we had 1e9
|
||||
instead of 1 gig (2^20)
|
||||
|
||||
client/
|
||||
cs_prefs.cpp
|
||||
sched/
|
||||
sched_send.cpp
|
||||
|
|
|
@ -57,9 +57,9 @@ double CLIENT_STATE::allowed_disk_usage() {
|
|||
|
||||
percent_space = host_info.d_total*global_prefs.disk_max_used_pct/100.0;
|
||||
|
||||
min_val = host_info.d_free - global_prefs.disk_min_free_gb*1e9;
|
||||
min_val = host_info.d_free - global_prefs.disk_min_free_gb*GIGA;
|
||||
|
||||
double size = min(min(global_prefs.disk_max_used_gb*(1e9), percent_space), min_val);
|
||||
double size = min(min(global_prefs.disk_max_used_gb*(GIGA), percent_space), min_val);
|
||||
if (size < 0) size = 0;
|
||||
return size;
|
||||
}
|
||||
|
|
|
@ -281,10 +281,10 @@ double max_allowable_disk(SCHEDULER_REQUEST& req, SCHEDULER_REPLY& reply) {
|
|||
// The post 4 oct 2005 case.
|
||||
// Compute the max allowable additional disk usage based on prefs
|
||||
//
|
||||
x1 = prefs.disk_max_used_gb*1e9 - host.d_boinc_used_total;
|
||||
x1 = prefs.disk_max_used_gb*GIGA - host.d_boinc_used_total;
|
||||
x2 = host.d_total*prefs.disk_max_used_pct/100.
|
||||
- host.d_boinc_used_total;
|
||||
x3 = host.d_free - prefs.disk_min_free_gb*1e9; // may be negative
|
||||
x3 = host.d_free - prefs.disk_min_free_gb*GIGA; // may be negative
|
||||
x = min(x1, min(x2, x3));
|
||||
|
||||
// see which bound is the most stringent
|
||||
|
@ -303,7 +303,7 @@ double max_allowable_disk(SCHEDULER_REQUEST& req, SCHEDULER_REPLY& reply) {
|
|||
// We can't honor the max_used for max_used_pct preferences.
|
||||
// We can only honor the min_free pref.
|
||||
//
|
||||
x = host.d_free - prefs.disk_min_free_gb*1e9; // may be negative
|
||||
x = host.d_free - prefs.disk_min_free_gb*GIGA; // may be negative
|
||||
reply.disk_limits.min_free = x;
|
||||
x1 = x2 = x3 = 0;
|
||||
}
|
||||
|
@ -1396,7 +1396,7 @@ void send_work(SCHEDULER_REQUEST& sreq, SCHEDULER_REPLY& reply) {
|
|||
);
|
||||
log_messages.printf(MSG_DEBUG,
|
||||
"available disk %f GB, work_buf_min %d\n",
|
||||
reply.wreq.disk_available/1e9,
|
||||
reply.wreq.disk_available/GIGA,
|
||||
(int)sreq.global_prefs.work_buf_min()
|
||||
);
|
||||
log_messages.printf(MSG_DEBUG,
|
||||
|
|
Loading…
Reference in New Issue