Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jul 2000 08:17:30 +0700 (ALMST)
From:      Boris Popov <bp@butya.kz>
To:        Andrzej Bialecki <abial@webgiro.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: SysctlFS
Message-ID:  <Pine.BSF.4.10.10007130754390.15644-100000@lion.butya.kz>
In-Reply-To: <Pine.BSF.4.20.0007121328020.49102-100000@mx.webgiro.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 12 Jul 2000, Andrzej Bialecki wrote:

> I've been tweaking the sysctls here and there for some time now, and I'd
> like to see what is the current opinion on implementing sysctl tree as a
> filesystem. Most of the work I've done with dynamic sysctls is very
> similar to what happens with filesystem. Also, filesystem model allows for
> much more fine-grained access control.

	I've played a bit with this and have reference implementation at
http://www.butya.kz/~bp/scfs.tar.gz (it hasn't been updated for recent
-current and may require some tweaks). This FS does nothing more than
representing existing sysctl tree as a file system.

	On a side note: many things in the kernel can be represented (and
they are) as 'tree' structure. Nodes of that tree can have 'file' like
attributes etc. At first sight VFS suit for it, but new file system will
require a mount point which might be not available during kernel
initialization. This can be solved by having two root vnodes - one is for
'normal' filesystems and second for internal kernel file system.

	So, internal fs can have structure like that:

	/bus	- newbus tree
	/dev	- device templates (instead of flat space provided by
		  kern_conf.c)
	/sysctl	- sysctl tree
	/nsmb	- SMB/CIFS requester tree

	but I don't think that the existing VFS implementation can be used
because it too superfluous for this task and vnode structure is too large.

--
Boris Popov
http://www.butya.kz/~bp/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10007130754390.15644-100000>