xref: /dragonfly/sys/vfs/ufs/ufs_extern.h (revision 277350a0)
1 /*-
2  * Copyright (c) 1991, 1993, 1994
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the University nor the names of its contributors
14  *    may be used to endorse or promote products derived from this software
15  *    without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  *	@(#)ufs_extern.h	8.10 (Berkeley) 5/14/95
30  * $FreeBSD: src/sys/ufs/ufs/ufs_extern.h,v 1.27.2.1 2000/12/28 11:01:46 ps Exp $
31  * $DragonFly: src/sys/vfs/ufs/ufs_extern.h,v 1.16 2008/09/17 21:44:25 dillon Exp $
32  */
33 
34 #ifndef _VFS_UFS_EXTERN_H_
35 #define	_VFS_UFS_EXTERN_H_
36 
37 struct componentname;
38 struct direct;
39 struct indir;
40 struct inode;
41 struct mount;
42 struct proc;
43 struct sockaddr;
44 struct ucred;
45 struct ufid;
46 struct vfsconf;
47 struct vnode;
48 struct vop_bmap_args;
49 struct vop_old_lookup_args;
50 struct vop_generic_args;
51 struct vop_inactive_args;
52 struct vop_reclaim_args;
53 
54 int	ufs_vnoperate(struct vop_generic_args *);
55 int	ufs_vnoperatefifo(struct vop_generic_args *);
56 int	ufs_vnoperatespec(struct vop_generic_args *);
57 
58 int	 ufs_bmap(struct vop_bmap_args *);
59 int	 ufs_bmaparray(struct vnode *, daddr_t, daddr_t *, struct indir *,
60 		int *, int *, int *);
61 int	 ufs_check_export(struct mount *, struct sockaddr *,
62 			       int *, struct ucred **);
63 int	 ufs_fhtovp(struct mount *, struct vnode *,
64 				struct ufid *, struct vnode **);
65 int	 ufs_checkpath(struct inode *, struct inode *, struct ucred *);
66 void	 ufs_dirbad(struct inode *, doff_t, char *);
67 int	 ufs_dirbadentry(struct vnode *, struct direct *, int);
68 int	 ufs_dirempty(struct inode *, ino_t, struct ucred *);
69 void	 ufs_makedirentry(struct inode *, struct componentname *,
70 	    struct direct *);
71 int	 ufs_direnter(struct vnode *, struct vnode *, struct direct *,
72 	    struct componentname *, struct buf *);
73 int	 ufs_dirremove(struct vnode *, struct inode *, int, int);
74 int	 ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int);
75 int	 ufs_getlbns(struct vnode *, ufs_daddr_t, struct indir *, int *);
76 struct vnode *
77 	 ufs_ihashget(struct ufsmount *, cdev_t, ino_t);
78 int	 ufs_ihashcheck(struct ufsmount *, cdev_t, ino_t);
79 void	 ufs_ihashinit(struct ufsmount *);
80 void	 ufs_ihashuninit(struct ufsmount *);
81 int	 ufs_ihashins(struct ufsmount *, struct inode *);
82 struct vnode *
83 	 ufs_ihashlookup(struct ufsmount *, cdev_t, ino_t);
84 void	 ufs_ihashrem(struct ufsmount *, struct inode *);
85 int	 ufs_inactive(struct vop_inactive_args *);
86 int	 ufs_init(struct vfsconf *);
87 void	 ufs_itimes(struct vnode *vp);
88 int	 ufs_lookup(struct vop_old_lookup_args *);
89 int	 ufs_reclaim(struct vop_reclaim_args *);
90 int	 ufs_root(struct mount *, struct vnode **);
91 int	 ufs_start(struct mount *, int, struct thread *);
92 int	 ufs_vinit(struct mount *, struct vnode **);
93 
94 /*
95  * Soft update function prototypes.
96  */
97 void	softdep_setup_directory_add(struct buf *, struct inode *, off_t,
98 	    ino_t, struct buf *);
99 void	softdep_change_directoryentry_offset(struct inode *, caddr_t,
100 	    caddr_t, caddr_t, int);
101 void	softdep_setup_remove(struct buf *,struct inode *, struct inode *,
102 	    int);
103 void	softdep_setup_directory_change(struct buf *, struct inode *,
104 	    struct inode *, ino_t, int);
105 void	softdep_change_linkcnt(struct inode *);
106 int	softdep_slowdown(struct vnode *);
107 
108 #endif /* !_VFS_UFS_EXTERN_H_ */
109