Here is a second one to add fuse sysctls. Cheers,
Index: sys/miscfs/fuse/fusefs.h =================================================================== RCS file: /cvs/src/sys/miscfs/fuse/fusefs.h,v retrieving revision 1.1 diff -u -p -r1.1 fusefs.h --- sys/miscfs/fuse/fusefs.h 3 Jun 2013 15:50:56 -0000 1.1 +++ sys/miscfs/fuse/fusefs.h 6 Jun 2013 21:41:36 -0000 @@ -18,6 +18,23 @@ #ifndef __FUSEFS_H__ #define __FUSEFS_H__ +/* sysctl defines */ +#define FUSEFS_NB_OPENDEVS 1 /* # of fuse devices opened */ +#define FUSEFS_INFBUFS 2 /* # of in fbufs */ +#define FUSEFS_WAITFBUFS 3 /* # of fbufs waiting for a response */ +#define FUSEFS_POOL_NBPAGES 4 /* # total fusefs size */ +#define FUSEFS_MAXID 5 /* number of valid fusefs ids */ + +#define FUSEFS_NAMES { \ + { 0, 0}, \ + { "fusefs_open_devices", CTLTYPE_INT }, \ + { "fusefs_fbufs_in", CTLTYPE_INT }, \ + { "fusefs_fbufs_wait", CTLTYPE_INT }, \ + { "fusefs_pool_pages", CTLTYPE_INT }, \ +} + +#ifdef _KERNEL + struct fuse_msg; struct fusefs_mnt { @@ -42,21 +59,6 @@ struct fusefs_mnt { extern struct vops fusefs_vops; extern struct pool fusefs_fbuf_pool; -/* sysctl defines */ -#define FUSEFS_NB_OPENDEVS 1 /* # of fuse devices opened */ -#define FUSEFS_INFBUFS 2 /* # of in fbufs */ -#define FUSEFS_WAITFBUFS 3 /* # of fbufs waiting for a response */ -#define FUSEFS_POOL_NBPAGES 4 /* # total fusefs size */ -#define FUSEFS_MAXID 5 /* number of valid fusefs ids */ - -#define FUSEFS_NAMES { \ - { 0, 0}, \ - { "fusefs_open_devices", CTLTYPE_INT }, \ - { "fusefs_fbufs_in", CTLTYPE_INT }, \ - { "fusefs_fbufs_wait", CTLTYPE_INT }, \ - { "fusefs_pool_pages", CTLTYPE_INT }, \ -} - /* fuse helpers */ #define TSLEEP_TIMEOUT 5 void update_vattr(struct mount *mp, struct vattr *v); @@ -82,4 +84,5 @@ void fuse_device_set_fmp(struct fusefs_m /* #define FUSE_DEBUG_VNOP #define FUSE_DEBUG */ +#endif /* _KERNEL */ #endif /* __FUSEFS_H__ */ Index: sbin/sysctl/sysctl.c =================================================================== RCS file: /cvs/src/sbin/sysctl/sysctl.c,v retrieving revision 1.189 diff -u -p -r1.189 sysctl.c --- sbin/sysctl/sysctl.c 16 Apr 2013 22:06:48 -0000 1.189 +++ sbin/sysctl/sysctl.c 6 Jun 2013 21:41:37 -0000 @@ -88,6 +88,8 @@ #include <ufs/ufs/inode.h> #include <ufs/ffs/ffs_extern.h> +#include <miscfs/fuse/fusefs.h> + #include <nfs/nfsproto.h> #include <nfs/nfs.h> @@ -1103,6 +1105,7 @@ debuginit(void) struct ctlname vfsgennames[] = CTL_VFSGENCTL_NAMES; struct ctlname ffsname[] = FFS_NAMES; struct ctlname nfsname[] = FS_NFS_NAMES; +struct ctlname fusefsname[] = FUSEFS_NAMES; struct list *vfsvars; int *vfs_typenums; @@ -1156,6 +1159,10 @@ vfsinit(void) if (!strcmp(vfc.vfc_name, MOUNT_NFS)) { vfsvars[cnt].list = nfsname; vfsvars[cnt].size = NFS_MAXID; + } + if (!strcmp(vfc.vfc_name, MOUNT_FUSEFS)) { + vfsvars[cnt].list = fusefsname; + vfsvars[cnt].size = FUSEFS_MAXID; } vfs_typenums[cnt] = vfc.vfc_typenum; strlcat(&names[loc], vfc.vfc_name, sizeof names - loc); Index: sbin/sysctl/sysctl.8 =================================================================== RCS file: /cvs/src/sbin/sysctl/sysctl.8,v retrieving revision 1.169 diff -u -p -r1.169 sysctl.8 --- sbin/sysctl/sysctl.8 2 Jun 2013 21:37:03 -0000 1.169 +++ sbin/sysctl/sysctl.8 6 Jun 2013 21:41:37 -0000 @@ -399,6 +399,10 @@ and a few require a kernel compiled with .It vfs.ffs.dirhash_maxmem Ta integer Ta yes .It vfs.ffs.dirhash_mem Ta integer Ta no .It vfs.nfs.iothreads Ta integer Ta yes +.It vfs.fuse.fusefs_open_devices Ta integer Ta no +.It vfs.fuse.fusefs_fbufs_in Ta integer Ta no +.It vfs.fuse.fusefs_fbufs_wait Ta integer Ta no +.It vfs.fuse.fusefs_pool_pages Ta integer Ta no .El .Pp The @@ -449,6 +453,8 @@ definitions for second level ddb identif definitions for second level vfs identifiers .It Aq Pa nfs/nfs.h definitions for third level NFS identifiers +.It Aq Pa miscfs/fuse/fusefs.h +definitions for third level fusefs identifiers .It Aq Pa ufs/ffs/ffs_extern.h definitions for third level FFS identifiers .It Aq Pa machine/cpu.h