]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sysctl kern.geom.journal.cache.limit shows negative value for FreeBSD/amd64
authorKirk McKusick <mckusick@FreeBSD.org>
Mon, 7 Aug 2017 19:18:27 +0000 (19:18 +0000)
committerKirk McKusick <mckusick@FreeBSD.org>
Mon, 7 Aug 2017 19:18:27 +0000 (19:18 +0000)
commit683590b64254cac0adf7d63653a1eb15def66e5e
tree5f19b2592727c0a136b78f1bb3d69306cce74564
parentc6841b079bc1e62d3477018a54f8cb6ac718e290
sysctl kern.geom.journal.cache.limit shows negative value for FreeBSD/amd64
system having over 4GB RAM. That's due to:

1) the limit being u_int instead of u_long like vm.kmem_size (the limit is
   half of vm.kmem_size by default for amd64);
2) sysctl handler g_journal_cache_limit_sysctl() using u_int instead of u_long.

The fix is to replace u_int with u_long for the kern.geom.journal.cache.limit
sysctl variable.

PR: 198500
Submitted by: Dr. Andreas Longwitz <longwitz@incore.de>
Reported by: Eugene Grosbein
Discussed with: kib
MFC after: 1 week
sys/geom/journal/g_journal.c