mirror of
https://github.com/isar/libmdbx.git
synced 2025-11-06 19:08:56 +08:00
mdbx: more info-output from mdbx_env_chk().
Print system io-block size, unified-page-cache block size, space allocated for the dxb-file in a filesystem.
This commit is contained in:
12
src/chk.c
12
src/chk.c
@@ -1449,9 +1449,11 @@ __cold static int env_chk(MDBX_chk_scope_t *const scope) {
|
|||||||
line = chk_puts(line, "is unavailable");
|
line = chk_puts(line, "is unavailable");
|
||||||
chk_line_end(line);
|
chk_line_end(line);
|
||||||
|
|
||||||
err = osal_filesize(env->lazy_fd, &env->dxb_mmap.filesize);
|
line = chk_print_size(chk_line_begin(scope, MDBX_chk_verbose), "system io-block ", chk->envinfo.mi_sys_ioblk, ", ");
|
||||||
if (unlikely(err))
|
line = chk_print_size(line, "unified page cache block ", chk->envinfo.mi_sys_upcblk, "");
|
||||||
return chk_error_rc(scope, err, "osal_filesize");
|
chk_line_end(line);
|
||||||
|
|
||||||
|
env->dxb_mmap.filesize = chk->envinfo.mi_dxb_fsize;
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -1530,6 +1532,10 @@ __cold static int env_chk(MDBX_chk_scope_t *const scope) {
|
|||||||
chk_line_end(chk_print(line, " > until it will be closed or reopened in read-write mode."));
|
chk_line_end(chk_print(line, " > until it will be closed or reopened in read-write mode."));
|
||||||
}
|
}
|
||||||
#endif /* Windows || Debug */
|
#endif /* Windows || Debug */
|
||||||
|
line = chk_print_size(chk_line_begin(scope, MDBX_chk_verbose), "space allocated for the dxb-file in a filesystem ",
|
||||||
|
chk->envinfo.mi_dxb_fallocated, " ");
|
||||||
|
line = chk_print(line, "%.2f%%", 100.0 * chk->envinfo.mi_dxb_fallocated / chk->envinfo.mi_geo.current);
|
||||||
|
chk_line_end(line);
|
||||||
chk_verbose_meta(inner, 0);
|
chk_verbose_meta(inner, 0);
|
||||||
chk_verbose_meta(inner, 1);
|
chk_verbose_meta(inner, 1);
|
||||||
chk_verbose_meta(inner, 2);
|
chk_verbose_meta(inner, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user