mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-20 20:09:28 +08:00
mdbx: rename bootid' fields to be neutral for endianess.
Change-Id: I7d52d3c2c93dcc6e886d336885070eb1aee1c284
This commit is contained in:
16
src/core.c
16
src/core.c
@@ -16834,12 +16834,12 @@ int __cold mdbx_env_info_ex(const MDBX_env *env, const MDBX_txn *txn,
|
||||
arg->mi_meta2_txnid = mdbx_meta_txnid_fluid(env, meta2);
|
||||
arg->mi_meta2_sign = meta2->mm_datasync_sign;
|
||||
if (likely(bytes > size_before_bootid)) {
|
||||
arg->mi_bootid.meta0.l = meta0->mm_bootid.x;
|
||||
arg->mi_bootid.meta1.l = meta0->mm_bootid.x;
|
||||
arg->mi_bootid.meta2.l = meta0->mm_bootid.x;
|
||||
arg->mi_bootid.meta0.h = meta0->mm_bootid.y;
|
||||
arg->mi_bootid.meta1.h = meta0->mm_bootid.y;
|
||||
arg->mi_bootid.meta2.h = meta0->mm_bootid.y;
|
||||
arg->mi_bootid.meta0.x = meta0->mm_bootid.x;
|
||||
arg->mi_bootid.meta1.x = meta0->mm_bootid.x;
|
||||
arg->mi_bootid.meta2.x = meta0->mm_bootid.x;
|
||||
arg->mi_bootid.meta0.y = meta0->mm_bootid.y;
|
||||
arg->mi_bootid.meta1.y = meta0->mm_bootid.y;
|
||||
arg->mi_bootid.meta2.y = meta0->mm_bootid.y;
|
||||
}
|
||||
|
||||
const MDBX_meta *txn_meta = recent_meta;
|
||||
@@ -16894,8 +16894,8 @@ int __cold mdbx_env_info_ex(const MDBX_env *env, const MDBX_txn *txn,
|
||||
arg->mi_autosync_threshold = pgno2bytes(env, *env->me_autosync_threshold);
|
||||
arg->mi_autosync_period_seconds16dot16 =
|
||||
mdbx_osal_monotime_to_16dot16(*env->me_autosync_period);
|
||||
arg->mi_bootid.current.l = bootid.x;
|
||||
arg->mi_bootid.current.h = bootid.y;
|
||||
arg->mi_bootid.current.x = bootid.x;
|
||||
arg->mi_bootid.current.y = bootid.y;
|
||||
arg->mi_mode = lck ? lck->mti_envmode : env->me_flags;
|
||||
}
|
||||
|
||||
|
@@ -967,13 +967,13 @@ static int meta_steady(void) { return meta_recent(true); }
|
||||
|
||||
static int meta_head(void) { return meta_recent(false); }
|
||||
|
||||
void verbose_meta(int num, txnid_t txnid, uint64_t sign, uint64_t bootid_h,
|
||||
uint64_t bootid_l) {
|
||||
void verbose_meta(int num, txnid_t txnid, uint64_t sign, uint64_t bootid_x,
|
||||
uint64_t bootid_y) {
|
||||
print(" - meta-%d: %s %" PRIu64, num, meta_synctype(sign), txnid);
|
||||
bool stay = true;
|
||||
const bool bootid_match = bootid_h == envinfo.mi_bootid.current.h &&
|
||||
bootid_l == envinfo.mi_bootid.current.l &&
|
||||
(bootid_h | bootid_l) != 0;
|
||||
const bool bootid_match = bootid_x == envinfo.mi_bootid.current.x &&
|
||||
bootid_y == envinfo.mi_bootid.current.y &&
|
||||
(bootid_x | bootid_y) != 0;
|
||||
|
||||
const int steady = meta_steady();
|
||||
const int head = meta_head();
|
||||
@@ -1368,11 +1368,11 @@ int main(int argc, char *argv[]) {
|
||||
envinfo.mi_recent_txnid - envinfo.mi_latter_reader_txnid);
|
||||
|
||||
verbose_meta(0, envinfo.mi_meta0_txnid, envinfo.mi_meta0_sign,
|
||||
envinfo.mi_bootid.meta0.h, envinfo.mi_bootid.meta0.l);
|
||||
envinfo.mi_bootid.meta0.x, envinfo.mi_bootid.meta0.y);
|
||||
verbose_meta(1, envinfo.mi_meta1_txnid, envinfo.mi_meta1_sign,
|
||||
envinfo.mi_bootid.meta1.h, envinfo.mi_bootid.meta1.l);
|
||||
envinfo.mi_bootid.meta1.x, envinfo.mi_bootid.meta1.y);
|
||||
verbose_meta(2, envinfo.mi_meta2_txnid, envinfo.mi_meta2_sign,
|
||||
envinfo.mi_bootid.meta2.h, envinfo.mi_bootid.meta2.l);
|
||||
envinfo.mi_bootid.meta2.x, envinfo.mi_bootid.meta2.y);
|
||||
}
|
||||
|
||||
if (verbose > 1)
|
||||
|
Reference in New Issue
Block a user