archrelease: copy trunk to staging-x86_64
[arch-packages.git] / db5.3 / trunk / db-5.3.28-mmap-high-cpu-usage.patch
blobb11ce08234df239af6dee011986f14781c74ac5d
1 Author: Filip Januš <fjanus@redhat.com>
2 Date: 6 Sep 2021
3 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1992402
4 Patch was created based on the discussion in the previous link
5 diff -ur db-5.3.28/src/os/os_map.c db_patch/src/os/os_map.c
6 --- db-5.3.28/src/os/os_map.c 2013-09-09 17:35:09.000000000 +0200
7 +++ db_patch/src/os/os_map.c 2021-09-09 07:33:12.027328265 +0200
8 @@ -213,7 +213,10 @@
9 if (rp->max < rp->size)
10 rp->max = rp->size;
11 if (ret == 0 && F_ISSET(infop, REGION_CREATE)) {
12 - if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
14 + rp->size = rp->max;
16 + if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
17 ret = __db_file_write(env, infop->fhp,
18 rp->size / MEGABYTE, rp->size % MEGABYTE, 0x00);
19 else