Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2008 20:27:22 +0200
From:      Ed Schouten <ed@80386.nl>
To:        FreeBSD FS <freebsd-fs@freebsd.org>, FreeBSD Arch <freebsd-arch@freebsd.org>
Cc:        Mark van Cuijk <mark@van-cuijk.nl>, Jille Timmermans <jille@quis.cx>
Subject:   Expanding vops in vop_vectors during startup
Message-ID:  <20080912182722.GK1191@hoeg.nl>

next in thread | raw e-mail | index | archive | help

--sU4rRG038CsJurvk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello everyone,

Yesterday I was talking with some friends of mine about the FreeBSD VFS
layer. As an exercise, Jille was trying to patch nullfs to hide .svn
directories (see hackers@), so that's how we got to the subject.

After talking about the way our vop_vector works (vop_bypass and
vop_default), we were wondering why we don't propagate all pointers in
the vop_vector to its children to save the unneeded function pointer
resolving inside the VOP_* calls.

I've created a patch that adds a new routine to the kernel,
vop_vector_init(), which recursively expands the vops. A new macro
(DECLARE_VOP_VECTOR) is used to automatically perform this when loading
modules/booting.

There is no need to reference default_vnodeops anymore, because it is
now used implicitly (when vop_vector =3D=3D NULL).

Any comments on the attached patch? I've only tested it with ufs,
nullfs, devfs, etc. yet. I haven't tested `make universe' yet, but I
suspect it shouldn't break hard.

URL:

	http://80386.nl/files/vnode-vop-expand.diff

Thanks!

--=20
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

--sU4rRG038CsJurvk
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkjKtIoACgkQ52SDGA2eCwWsoQCeLhN84yU86WavBhgGnSLrxXs5
pTMAnR5LoTV8qUpLi2FxO38Hr5pw0Tak
=ALjF
-----END PGP SIGNATURE-----

--sU4rRG038CsJurvk--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080912182722.GK1191>