pseudofs_internal.h revision 168637
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 168637 2007-04-11 22:40:57Z 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;
4584247Sdes	struct vnode	*pvd_vnode;
4684247Sdes	struct pfs_vdata*pvd_prev, *pvd_next;
47168637Sdes	int		 pvd_dead:1;
4877998Sdes};
4977998Sdes
5077998Sdes/*
5175295Sdes * Vnode cache
5275295Sdes */
5375295Sdesvoid	 pfs_vncache_load	(void);
5475295Sdesvoid	 pfs_vncache_unload	(void);
5575295Sdesint	 pfs_vncache_alloc	(struct mount *, struct vnode **,
5677998Sdes				 struct pfs_node *, pid_t pid);
5775295Sdesint	 pfs_vncache_free	(struct vnode *);
5875295Sdes
5975295Sdes/*
6075295Sdes * File number bitmap
6175295Sdes */
6275295Sdesvoid	 pfs_fileno_init	(struct pfs_info *);
6375295Sdesvoid	 pfs_fileno_uninit	(struct pfs_info *);
6475295Sdesvoid	 pfs_fileno_alloc	(struct pfs_info *, struct pfs_node *);
6575295Sdesvoid	 pfs_fileno_free	(struct pfs_info *, struct pfs_node *);
6675295Sdes
6775295Sdes#endif
68