mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:24:13 +08:00
mdbx-chk: don't treat mm_geo.current < dxbfile_pages
as an error
This it is valid usual case on Windows, since windows can't shrinking a mapped file. So we shouldn't see an error while checking such files on Linux. Change-Id: I830c236c9b2fc1eb21768fceb24e67b9486c0795
This commit is contained in:
parent
b274c4a730
commit
d869e20941
@ -1115,14 +1115,11 @@ int main(int argc, char *argv[]) {
|
||||
const uint64_t dxbfile_pages = dxb_filesize / envinfo.mi_dxb_pagesize;
|
||||
alloc_pages = txn->mt_next_pgno;
|
||||
backed_pages = envinfo.mi_geo.current / envinfo.mi_dxb_pagesize;
|
||||
#if !(defined(_WIN32) || defined(_WIN64))
|
||||
if ((envflags & (MDBX_EXCLUSIVE | MDBX_RDONLY)) != MDBX_RDONLY &&
|
||||
backed_pages != dxbfile_pages) {
|
||||
print(" ! backed-pages %" PRIu64 " != file-pages %" PRIu64 "\n",
|
||||
if (backed_pages > dxbfile_pages) {
|
||||
print(" ! backed-pages %" PRIu64 " > file-pages %" PRIu64 "\n",
|
||||
backed_pages, dxbfile_pages);
|
||||
++problems_meta;
|
||||
}
|
||||
#endif /* !Windows */
|
||||
if (dxbfile_pages < NUM_METAS)
|
||||
print(" ! file-pages %" PRIu64 " < %u\n", dxbfile_pages, NUM_METAS);
|
||||
if (backed_pages < NUM_METAS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user