Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Sep 1998 00:48:30 -0400 (EDT)
From:      Robert Watson <robert@cyrus.watson.org>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Writing lkms that use vnode.h
Message-ID:  <Pine.BSF.3.96.980902004442.29692B-100000@fledge.watson.org>

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

Under FreeBSD 3.0-CURRENT, I wish to write an lkm that calls namei
(followed afterwards by a vput() of the vnode to return the
reference/lock).  However, I am having problems as vnode.h includes
vnode_if.h with KERNEL is defined.  vnode_if.h appears to be assembled
auto-magically by config for specific kernels.  I believe that this occurs
so as to construct the table of possible vfs calls out of the union of the
calls supported by various vfs providers (correct me if I'm wrong).

If the information necessary to make vnode calls is only available when a
specific kernel is built, does this mean an lkm cannot make direct use of
these calls?  This conclusion seems silly, and probably wrong.  The
existing /lkm tree (built as part of buildworld?) contains several pieces
of code that reference vnode.h, with apparent success.

Any advice here would be welcomed.  Also, is there a reference for those
playing with lkm's under FreeBSD?  I have read through the material in
/usr/share/example/lkm and written a number of modules, but am starting to
run into some holes in the easily accessible knowledge base :)

Thanks,

  Robert N Watson 

Carnegie Mellon University            http://www.cmu.edu/
TIS Labs at Network Associates, Inc.  http://www.tis.com/
SafePort Network Services             http://www.safeport.com/
robert@fledge.watson.org              http://www.watson.org/~robert/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" 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.3.96.980902004442.29692B-100000>