Re: top: sysctl(vfs.bufspace...) expected 8, got 4

From: Mateusz Guzik <mjguzik_at_gmail.com>
Date: Thu, 22 Feb 2018 18:52:25 +0100
On Thu, Feb 22, 2018 at 6:41 PM, O. Hartmann <ohartmann_at_walstatt.org> wrote:

> Am Wed, 21 Feb 2018 20:05:24 +0100
> "O. Hartmann" <o.hartmann_at_walstatt.org> schrieb:
>
> > On CURRENT ( 12.0-CURRENT FreeBSD 12.0-CURRENT #196 r329679: Tue Feb 20
> 23:06:15 CET
> > 2018 amd64) I'm honored by this nice bug when calling top:
> >
> > top: sysctl(vfs.bufspace...) expected 8, got 4
> >
> >
> > Regards,
> >
> > oh
>
> I still can not use "top", it quits with the error mentioned above. Whats
> is wrong with
> my setup?
>
>
Looks like a fallout from r329612.

Try this, untested:

 diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index a2a1736a24f4..7cb6aa15ddc5 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
_at__at_ -423,7 +423,7 _at__at_ sysctl_bufspace(SYSCTL_HANDLER_ARGS)
        lvalue = 0;
        for (i = 0; i < clean_domains; i++)
                lvalue += bdclean[i].bd_bufspace;
-       return (sysctl_handle_int(oidp, &lvalue, 0, req));
+       return (sysctl_handle_long(oidp, &lvalue, 0, req));
 }
 #endif
Received on Thu Feb 22 2018 - 16:52:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:15 UTC