summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_init.c
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>2002-03-05 15:38:49 +0000
committereivind <eivind@FreeBSD.org>2002-03-05 15:38:49 +0000
commit05c20bbea2842755e3f6340c2b384ad589b3c4fc (patch)
tree54b10581aaf2314fb9fc332f339e3a7eab921dab /sys/kern/vfs_init.c
parent9df5bc6dbf78e6a17d823620d54cf46bfd9fac47 (diff)
downloadFreeBSD-src-05c20bbea2842755e3f6340c2b384ad589b3c4fc.zip
FreeBSD-src-05c20bbea2842755e3f6340c2b384ad589b3c4fc.tar.gz
Document all functions, global and static variables, and sysctls.
Includes some minor whitespace changes, and re-ordering to be able to document properly (e.g, grouping of variables and the SYSCTL macro calls for them, where the documentation has been added.) Reviewed by: phk (but all errors are mine)
Diffstat (limited to 'sys/kern/vfs_init.c')
-rw-r--r--sys/kern/vfs_init.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index 76d1155..bbec365 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -56,6 +56,11 @@ MALLOC_DEFINE(M_VNODE, "vnodes", "Dynamically allocated vnodes");
* The highest defined VFS number.
*/
int maxvfsconf = VFS_GENERIC + 1;
+
+/*
+ * Single-linked list of configured VFSes.
+ * New entries are added/deleted by vfs_register()/vfs_unregister()
+ */
struct vfsconf *vfsconf;
/*
@@ -81,10 +86,19 @@ static int vnodeopv_num;
/* Table of known descs (list of vnode op handlers "vop_access_desc") */
static struct vnodeop_desc **vfs_op_descs;
-static int *vfs_op_desc_refs; /* reference counts */
+/* Reference counts for vfs_op_descs */
+static int *vfs_op_desc_refs;
+/* Number of descriptions */
static int num_op_descs;
+/* Number of entries in each description */
static int vfs_opv_numops;
+/*
+ * Recalculate the operations vector/description (those parts of it that can
+ * be recalculated, that is.)
+ * XXX It may be preferable to replace this function with an invariant check
+ * and a set of functions that should keep the table invariant.
+ */
static void
vfs_opv_recalc(void)
{
@@ -143,6 +157,7 @@ vfs_opv_recalc(void)
}
}
+/* Add a set of vnode operations (a description) to the table above. */
void
vfs_add_vnodeops(const void *data)
{
@@ -210,6 +225,7 @@ vfs_add_vnodeops(const void *data)
vfs_opv_recalc();
}
+/* Remove a vnode type from the vnode description table above. */
void
vfs_rm_vnodeops(const void *data)
{
@@ -302,6 +318,7 @@ vfsinit(void *dummy)
}
SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vfsinit, NULL)
+/* Register a new file system type in the global table */
int
vfs_register(struct vfsconf *vfc)
{
@@ -347,6 +364,7 @@ vfs_register(struct vfsconf *vfc)
}
+/* Remove registration of a file system type */
int
vfs_unregister(struct vfsconf *vfc)
{
@@ -382,6 +400,10 @@ vfs_unregister(struct vfsconf *vfc)
return 0;
}
+/*
+ * Standard kernel module handling code for file system modules.
+ * Referenced from VFS_SET().
+ */
int
vfs_modevent(module_t mod, int type, void *data)
{
OpenPOWER on IntegriCloud