Permalink
Browse files

handling MAX_DISK=0 correctly

  • Loading branch information...
1 parent 3c8e4c8 commit a0171de5742d36c4bc940f66a7650bf886dc5c6b @dmitrii dmitrii committed Dec 3, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 node/handlers.c
View
6 node/handlers.c
@@ -995,7 +995,11 @@ static int init (void)
if (max_disk_gb != -1) {
if (conf_work_size_mb == -1) {
logprintfl (EUCAWARN, "warning: using deprecated setting %s for the new setting %s\n", CONFIG_MAX_DISK, CONFIG_NC_WORK_SIZE);
- conf_work_size_mb = max_disk_gb * 1024;
+ if (max_disk_gb == 0) {
+ conf_work_size_mb = -1; // change in semantics: 0 used to mean 'unlimited', now 'unset' or -1 means that
+ } else {
+ conf_work_size_mb = max_disk_gb * 1024;
+ }
} else {
logprintfl (EUCAWARN, "warning: ignoring deprecated setting %s in favor of the new setting %s\n", CONFIG_MAX_DISK, CONFIG_NC_WORK_SIZE);
}

0 comments on commit a0171de

Please sign in to comment.