pseudofs_internal.h revision 77998
175295Sdes/*-
275295Sdes * Copyright (c) 2001 Dag-Erling Co�dan Sm�rgrav
375295Sdes * All rights reserved.
475295Sdes *
575295Sdes * Redistribution and use in source and binary forms, with or without
675295Sdes * modification, are permitted provided that the following conditions
775295Sdes * are met:
875295Sdes * 1. Redistributions of source code must retain the above copyright
975295Sdes *    notice, this list of conditions and the following disclaimer
1075295Sdes *    in this position and unchanged.
1175295Sdes * 2. Redistributions in binary form must reproduce the above copyright
1275295Sdes *    notice, this list of conditions and the following disclaimer in the
1375295Sdes *    documentation and/or other materials provided with the distribution.
1475295Sdes * 3. The name of the author may not be used to endorse or promote products
1575295Sdes *    derived from this software without specific prior written permission.
1675295Sdes *
1775295Sdes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1875295Sdes * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1975295Sdes * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2075295Sdes * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2175295Sdes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2275295Sdes * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2375295Sdes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2475295Sdes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2575295Sdes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2675295Sdes * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2775295Sdes *
2875295Sdes *      $FreeBSD: head/sys/fs/pseudofs/pseudofs_internal.h 77998 2001-06-10 18:39:21Z des $
2975295Sdes */
3075295Sdes
3175295Sdes#ifndef _PSEUDOFS_INTERNAL_H_INCLUDED
3275295Sdes#define _PSEUDOFS_INTERNAL_H_INCLUDED
3375295Sdes
3475295Sdes/*
3575295Sdes * Sysctl subtree
3675295Sdes */
3775295SdesSYSCTL_DECL(_vfs_pfs);
3875295Sdes
3975295Sdes/*
4077998Sdes * Vnode data
4177998Sdes */
4277998Sdesstruct pfs_vdata {
4377998Sdes	struct pfs_node	*pvd_pn;
4477998Sdes	pid_t		 pvd_pid;
4577998Sdes};
4677998Sdes
4777998Sdes/*
4875295Sdes * Vnode cache
4975295Sdes */
5075295Sdesvoid	 pfs_vncache_load	(void);
5175295Sdesvoid	 pfs_vncache_unload	(void);
5275295Sdesint	 pfs_vncache_alloc	(struct mount *, struct vnode **,
5377998Sdes				 struct pfs_node *, pid_t pid);
5475295Sdesint	 pfs_vncache_free	(struct vnode *);
5575295Sdes
5675295Sdes/*
5775295Sdes * File number bitmap
5875295Sdes */
5975295Sdesvoid	 pfs_fileno_load	(void);
6075295Sdesvoid	 pfs_fileno_unload	(void);
6175295Sdesvoid	 pfs_fileno_init	(struct pfs_info *);
6275295Sdesvoid	 pfs_fileno_uninit	(struct pfs_info *);
6375295Sdesvoid	 pfs_fileno_alloc	(struct pfs_info *, struct pfs_node *);
6475295Sdesvoid	 pfs_fileno_free	(struct pfs_info *, struct pfs_node *);
6575295Sdes
6675295Sdes#endif
67