From: Eric Bollengier Date: Mon, 29 Nov 2010 16:45:22 +0000 (+0100) Subject: Rename MaximumBandwidth to MaximumBandwidthPerJob for Client directives X-Git-Tag: Release-5.2.1~848 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=86d49c358391dcad6f8e757d924194e439eee32f;p=bacula%2Fbacula Rename MaximumBandwidth to MaximumBandwidthPerJob for Client directives --- diff --git a/bacula/src/filed/filed_conf.c b/bacula/src/filed/filed_conf.c index 4986f14733..9c31ffb5e5 100644 --- a/bacula/src/filed/filed_conf.c +++ b/bacula/src/filed/filed_conf.c @@ -118,7 +118,7 @@ static RES_ITEM cli_items[] = { {"tlscertificate", store_dir, ITEM(res_client.tls_certfile), 0, 0, 0}, {"tlskey", store_dir, ITEM(res_client.tls_keyfile), 0, 0, 0}, {"verid", store_str, ITEM(res_client.verid), 0, 0, 0}, - {"maximumbandwidth", store_speed, ITEM(res_client.max_bandwidth), 0, 0, 0}, + {"maximumbandwidthperjob", store_speed, ITEM(res_client.max_bandwidth_per_job), 0, 0, 0}, {NULL, NULL, {0}, 0, 0, 0} }; @@ -139,7 +139,7 @@ static RES_ITEM dir_items[] = { {"tlskey", store_dir, ITEM(res_dir.tls_keyfile), 0, 0, 0}, {"tlsdhfile", store_dir, ITEM(res_dir.tls_dhfile), 0, 0, 0}, {"tlsallowedcn", store_alist_str, ITEM(res_dir.tls_allowed_cns), 0, 0, 0}, - {"maximumbandwidth", store_speed, ITEM(res_dir.max_bandwidth), 0, 0, 0}, + {"maximumbandwidthperjob", store_speed, ITEM(res_dir.max_bandwidth_per_job), 0, 0, 0}, {NULL, NULL, {0}, 0, 0, 0} }; diff --git a/bacula/src/filed/filed_conf.h b/bacula/src/filed/filed_conf.h index 2200691f9b..53244ed7b6 100644 --- a/bacula/src/filed/filed_conf.h +++ b/bacula/src/filed/filed_conf.h @@ -69,7 +69,7 @@ struct DIRRES { char *tls_keyfile; /* TLS Server Key File */ char *tls_dhfile; /* TLS Diffie-Hellman Parameters */ alist *tls_allowed_cns; /* TLS Allowed Clients */ - uint64_t max_bandwidth; /* Bandwidth limitation (per director) */ + uint64_t max_bandwidth_per_job; /* Bandwidth limitation (per director) */ TLS_CONTEXT *tls_ctx; /* Shared TLS Context */ }; @@ -105,7 +105,7 @@ struct CLIENT { alist *pki_recipients; /* Shared PKI Recipients */ TLS_CONTEXT *tls_ctx; /* Shared TLS Context */ char *verid; /* Custom Id to print in version command */ - uint64_t max_bandwidth; /* Bandwidth limitation (global) */ + uint64_t max_bandwidth_per_job; /* Bandwidth limitation (global) */ }; diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index c42753c482..31c2ccd4c4 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -502,8 +502,8 @@ static int setbandwidth_cmd(JCR *jcr) free_jcr(cjcr); } - } else { /* No job requested, apply globally */ - me->max_bandwidth = bw; /* Overwrite directive */ + } else { /* No job requested, apply globally */ + me->max_bandwidth_per_job = bw; /* Overwrite directive */ } return dir->fsend(OKBandwidth); @@ -1736,11 +1736,11 @@ static int storage_cmd(JCR *jcr) /* TODO: see if we put limit on restore and backup... */ if (!jcr->max_bandwidth) { - if (jcr->director->max_bandwidth) { - jcr->max_bandwidth = jcr->director->max_bandwidth; + if (jcr->director->max_bandwidth_per_job) { + jcr->max_bandwidth = jcr->director->max_bandwidth_per_job; - } else if (me->max_bandwidth) { - jcr->max_bandwidth = me->max_bandwidth; + } else if (me->max_bandwidth_per_job) { + jcr->max_bandwidth = me->max_bandwidth_per_job; } } sd->set_bwlimit(jcr->max_bandwidth); diff --git a/bacula/src/filed/status.c b/bacula/src/filed/status.c index ed4f04d6d0..31dad70cff 100644 --- a/bacula/src/filed/status.c +++ b/bacula/src/filed/status.c @@ -140,7 +140,7 @@ static void list_status_header(STATUS_PKT *sp) sendit(msg.c_str(), len, sp); len = Mmsg(msg, _(" Sizeof: boffset_t=%d size_t=%d debug=%d trace=%d " "bwlimit=%lldkb/s\n"), sizeof(boffset_t), sizeof(size_t), - debug_level, get_trace(), me->max_bandwidth/1024); + debug_level, get_trace(), me->max_bandwidth_per_job/1024); sendit(msg.c_str(), len, sp); if (debug_level > 0 && plugin_list->size() > 0) { Plugin *plugin;