+3505. [bug] When setting "max-cache-size" and "max-acache-size",
+ larger values than 4 gigabytes could not be set
+ explicitly, though larger sizes were available
+ when setting cache size to 0. This has been
+ corrected; the full range is now available.
+ [RT #32358]
+
3503. [doc] Clarify size_spec syntax. [RT #32449]
3501. [func] zone-statistics now takes three options: full,
cache_sharable(dns_view_t *originview, dns_view_t *view,
isc_boolean_t new_zero_no_soattl,
unsigned int new_cleaning_interval,
- isc_uint32_t new_max_cache_size)
+ isc_uint64_t new_max_cache_size)
{
/*
* If the cache cannot even reused for the same view, it cannot be
in_port_t port;
dns_cache_t *cache = NULL;
isc_result_t result;
- isc_uint32_t max_adb_size;
unsigned int cleaning_interval;
- isc_uint32_t max_cache_size;
- isc_uint32_t max_acache_size;
+ size_t max_cache_size;
+ size_t max_acache_size;
+ size_t max_adb_size;
isc_uint32_t lame_ttl;
dns_tsig_keyring_t *ring = NULL;
dns_view_t *pview = NULL; /* Production view */
max_acache_size = ISC_UINT32_MAX;
} else {
isc_resourcevalue_t value;
-
value = cfg_obj_asuint64(obj);
- if (value > ISC_UINT32_MAX) {
- cfg_obj_log(obj, ns_g_lctx, ISC_LOG_ERROR,
+ if (value > SIZE_MAX) {
+ cfg_obj_log(obj, ns_g_lctx,
+ ISC_LOG_WARNING,
"'max-acache-size "
- "%" ISC_PRINT_QUADFORMAT
- "d' is too large",
- value);
- result = ISC_R_RANGE;
- goto cleanup;
+ "%" ISC_PRINT_QUADFORMAT "u' "
+ "is too large for this "
+ "system; reducing to %lu",
+ value, SIZE_MAX);
+ value = SIZE_MAX;
}
- max_acache_size = (isc_uint32_t)value;
+ max_cache_size = (size_t) value;
}
dns_acache_setcachesize(view->acache, max_acache_size);
}
} else {
isc_resourcevalue_t value;
value = cfg_obj_asuint64(obj);
- if (value > ISC_UINT32_MAX) {
- cfg_obj_log(obj, ns_g_lctx, ISC_LOG_ERROR,
+ if (value > SIZE_MAX) {
+ cfg_obj_log(obj, ns_g_lctx,
+ ISC_LOG_WARNING,
"'max-cache-size "
- "%" ISC_PRINT_QUADFORMAT "d' is too large",
- value);
- result = ISC_R_RANGE;
- goto cleanup;
+ "%" ISC_PRINT_QUADFORMAT "u' "
+ "is too large for this "
+ "system; reducing to %lu",
+ value, SIZE_MAX);
+ value = SIZE_MAX;
}
- max_cache_size = (isc_uint32_t)value;
+ max_cache_size = (size_t) value;
}
/* Check-names. */
serial-queries 10;
serial-query-rate 100;
server-id none;
+ max-cache-size 20000000000000;
zone-statistics none;
};
view "first" {
approaches
the specified size, some of the oldest transactions in the
journal
- will be automatically removed. The default is
- <literal>unlimited</literal>.
+ will be automatically removed. The largest permitted
+ value is 2 gigabytes. The default is
+ <literal>unlimited</literal>, which also
+ means 2 gigabytes.
This may also be set on a per-zone basis.
</para>
</listitem>
* function for more details about the logic.
*/
void
-dns_acache_setcachesize(dns_acache_t *acache, isc_uint32_t size) {
- isc_uint32_t lowater;
- isc_uint32_t hiwater;
+dns_acache_setcachesize(dns_acache_t *acache, size_t size) {
+ size_t hiwater, lowater;
REQUIRE(DNS_ACACHE_VALID(acache));
}
void
-dns_adb_setadbsize(dns_adb_t *adb, isc_uint32_t size) {
- isc_uint32_t hiwater;
- isc_uint32_t lowater;
+dns_adb_setadbsize(dns_adb_t *adb, size_t size) {
+ size_t hiwater, lowater;
INSIST(DNS_ADB_VALID(adb));
char *db_type;
int db_argc;
char **db_argv;
- isc_uint32_t size;
+ size_t size;
/* Locked by 'filelock'. */
char *filename;
}
void
-dns_cache_setcachesize(dns_cache_t *cache, isc_uint32_t size) {
- isc_uint32_t lowater;
- isc_uint32_t hiwater;
+dns_cache_setcachesize(dns_cache_t *cache, size_t size) {
+ size_t hiwater, lowater;
REQUIRE(VALID_CACHE(cache));
isc_mem_setwater(cache->mctx, water, cache, hiwater, lowater);
}
-isc_uint32_t
+size_t
dns_cache_getcachesize(dns_cache_t *cache) {
- isc_uint32_t size;
+ size_t size;
REQUIRE(VALID_CACHE(cache));
*/
void
-dns_acache_setcachesize(dns_acache_t *acache, isc_uint32_t size);
+dns_acache_setcachesize(dns_acache_t *acache, size_t size);
/*
* Set the maximum additional cache size. 0 means unlimited.
*/
*/
void
-dns_adb_setadbsize(dns_adb_t *adb, isc_uint32_t size);
+dns_adb_setadbsize(dns_adb_t *adb, size_t size);
/*%<
* Set a target memory size. If memory usage exceeds the target
* size entries will be removed before they would have expired on
* Get the periodic cache cleaning interval to 'interval' seconds.
*/
-isc_uint32_t
-dns_cache_getcachesize(dns_cache_t *cache);
-/*%<
- * Get the maximum cache size.
- */
-
const char *
dns_cache_getname(dns_cache_t *cache);
/*%<
*/
void
-dns_cache_setcachesize(dns_cache_t *cache, isc_uint32_t size);
+dns_cache_setcachesize(dns_cache_t *cache, size_t size);
/*%<
* Set the maximum cache size. 0 means unlimited.
*/
-isc_uint32_t
+size_t
dns_cache_getcachesize(dns_cache_t *cache);
/*%<
* Get the maximum cache size.