mdbx: clarify mdbx_backlog_size().

Change-Id: I42170dded36b7259f61c028fefb72691ff791388
This commit is contained in:
Leonid Yuriev 2018-09-01 21:00:13 +03:00 committed by Leo Yuriev
parent e00dce3543
commit 7ce1a4c0cf

View File

@ -3532,10 +3532,12 @@ int mdbx_txn_abort(MDBX_txn *txn) {
}
static __inline int mdbx_backlog_size(MDBX_txn *txn) {
int reclaimed = txn->mt_env->me_reclaimed_pglist
? MDBX_PNL_SIZE(txn->mt_env->me_reclaimed_pglist)
: 0;
return reclaimed + txn->mt_loose_count + txn->mt_end_pgno - txn->mt_next_pgno;
int reclaimed_and_loose =
txn->mt_env->me_reclaimed_pglist
? MDBX_PNL_SIZE(txn->mt_env->me_reclaimed_pglist) +
txn->mt_loose_count
: 0;
return reclaimed_and_loose + txn->mt_end_pgno - txn->mt_next_pgno;
}
static __inline int mdbx_backlog_extragap(MDBX_env *env) {