"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/knot/journal/journal_metadata.c" between
knot-2.9.1.tar.xz and knot-2.9.2.tar.xz

About: Knot DNS is a high-performance authoritative-only DNS server (supports zone transfers, dynamic updates and DNSSEC).

journal_metadata.c  (knot-2.9.1.tar.xz):journal_metadata.c  (knot-2.9.2.tar.xz)
skipping to change at line 301 skipping to change at line 301
knot_lmdb_begin(j.db, &txn, true); knot_lmdb_begin(j.db, &txn, true);
journal_load_metadata(&txn, j.zone, &md); journal_load_metadata(&txn, j.zone, &md);
md.flushed_upto = md.serial_to; md.flushed_upto = md.serial_to;
journal_store_metadata(&txn, j.zone, &md); journal_store_metadata(&txn, j.zone, &md);
knot_lmdb_commit(&txn); knot_lmdb_commit(&txn);
return txn.ret; return txn.ret;
} }
int journal_info(zone_journal_t j, bool *exists, uint32_t *first_serial, int journal_info(zone_journal_t j, bool *exists, uint32_t *first_serial, bool *h as_zij,
uint32_t *serial_to, bool *has_merged, uint32_t *merged_serial, uint32_t *serial_to, bool *has_merged, uint32_t *merged_serial,
uint64_t *occupied, uint64_t *occupied_total) uint64_t *occupied, uint64_t *occupied_total)
{ {
if (!knot_lmdb_exists(j.db)) { if (!knot_lmdb_exists(j.db)) {
*exists = false; *exists = false;
return KNOT_EOK; return KNOT_EOK;
} }
int ret = knot_lmdb_open(j.db); int ret = knot_lmdb_open(j.db);
if (ret != KNOT_EOK) { if (ret != KNOT_EOK) {
return ret; return ret;
} }
knot_lmdb_txn_t txn = { 0 }; knot_lmdb_txn_t txn = { 0 };
journal_metadata_t md = { 0 }; journal_metadata_t md = { 0 };
knot_lmdb_begin(j.db, &txn, false); knot_lmdb_begin(j.db, &txn, false);
journal_load_metadata(&txn, j.zone, &md); journal_load_metadata(&txn, j.zone, &md);
*exists = (md.flags & JOURNAL_SERIAL_TO_VALID); *exists = (md.flags & JOURNAL_SERIAL_TO_VALID);
if (first_serial != NULL) { if (first_serial != NULL) {
*first_serial = md.first_serial; *first_serial = md.first_serial;
} }
if (has_zij != NULL) {
*has_zij = journal_contains(&txn, true, 0, j.zone);
}
if (serial_to != NULL) { if (serial_to != NULL) {
*serial_to = md.serial_to; *serial_to = md.serial_to;
} }
if (has_merged != NULL) { if (has_merged != NULL) {
*has_merged = (md.flags & JOURNAL_MERGED_SERIAL_VALID); *has_merged = (md.flags & JOURNAL_MERGED_SERIAL_VALID);
} }
if (merged_serial != NULL) { if (merged_serial != NULL) {
*merged_serial = md.merged_serial; *merged_serial = md.merged_serial;
} }
if (occupied != NULL) { if (occupied != NULL) {
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)