Commit d357d62f authored by Libor Peltan's avatar Libor Peltan

conf: kasp_db config moved from zone to forced default template; added kasp db mapsize

parent efc9168c
......@@ -1078,6 +1078,19 @@ char* conf_journalfile_txn(
return journaldir;
}
char* conf_kaspdir_txn(
conf_t *conf,
knot_db_txn_t *txn)
{
conf_val_t val = conf_default_get_txn(conf, txn, C_STORAGE);
char *storage = conf_abs_path(&val, NULL);
val = conf_default_get_txn(conf, txn, C_KASP_DB);
char *kaspdir = conf_abs_path(&val, storage);
free(storage);
return kaspdir;
}
size_t conf_udp_threads_txn(
conf_t *conf,
knot_db_txn_t *txn)
......
......@@ -592,6 +592,15 @@ static inline char* conf_journalfile(
return conf_journalfile_txn(conf, &conf->read_txn);
}
char* conf_kaspdir_txn(
conf_t *conf,
knot_db_txn_t *txn);
static inline char* conf_kaspdir(
conf_t *conf)
{
return conf_kaspdir_txn(conf, &conf->read_txn);
}
char* conf_old_journalfile(
conf_t *conf,
const knot_dname_t *zone
......
......@@ -255,7 +255,6 @@ static const yp_item_t desc_remote[] = {
{ C_MAX_ZONE_SIZE, YP_TINT, YP_VINT = { 0, INT64_MAX, INT64_MAX, YP_SSIZE }, FLAGS }, \
{ C_MAX_JOURNAL_USAGE, YP_TINT, YP_VINT = { KILO(40), INT64_MAX, MEGA(100), YP_SSIZE } }, \
{ C_MAX_JOURNAL_DEPTH, YP_TINT, YP_VINT = { 2, INT64_MAX, INT64_MAX } }, \
{ C_KASP_DB, YP_TSTR, YP_VSTR = { "keys" }, FLAGS }, \
{ C_DNSSEC_SIGNING, YP_TBOOL, YP_VNONE, FLAGS }, \
{ C_DNSSEC_POLICY, YP_TREF, YP_VREF = { C_POLICY }, FLAGS, { check_ref_dflt } }, \
{ C_SERIAL_POLICY, YP_TOPT, YP_VOPT = { serial_policies, SERIAL_POLICY_INCREMENT } }, \
......@@ -279,6 +278,9 @@ static const yp_item_t desc_template[] = {
{ C_MAX_JOURNAL_DB_SIZE, YP_TINT, YP_VINT = { JOURNAL_MIN_FSLIMIT, VIRT_MEM_LIMIT(TERA(100)),
VIRT_MEM_LIMIT(GIGA(20)), YP_SSIZE },
CONF_IO_FRLD_SRV },
{ C_KASP_DB, YP_TSTR, YP_VSTR = { "keys" }, CONF_IO_FRLD_SRV },
{ C_KASP_DB_MAPSIZE, YP_TINT, YP_VINT = { MEGA(10), GIGA(2), MEGA(500), YP_SSIZE },
CONF_IO_FRLD_SRV },
{ NULL }
};
......
......@@ -57,6 +57,7 @@
#define C_JOURNAL_DB "\x0A""journal-db"
#define C_JOURNAL_DB_MODE "\x0F""journal-db-mode"
#define C_KASP_DB "\x07""kasp-db"
#define C_KASP_DB_MAPSIZE "\x0F""kasp-db-mapsize"
#define C_KEY "\x03""key"
#define C_KEYSTORE "\x08""keystore"
#define C_KSK_SIZE "\x08""ksk-size"
......
......@@ -509,6 +509,8 @@ int check_template(
CHECK_DFLT(C_JOURNAL_DB, "journal database path");
CHECK_DFLT(C_JOURNAL_DB_MODE, "journal database mode");
CHECK_DFLT(C_MAX_JOURNAL_DB_SIZE, "journal database maximum size");
CHECK_DFLT(C_KASP_DB, "KASP database path");
CHECK_DFLT(C_KASP_DB_MAPSIZE, "KASP database mapsize");
return KNOT_EOK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment