UbixOS V2 2.0

ufs_extern.h
Go to the documentation of this file.
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 * 4. 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: releng/11.1/sys/ufs/ufs/ufs_extern.h 262678 2014-03-02 02:52:34Z pfg $
31 */
32
33 #ifndef _UFS_UFS_EXTERN_H_
34 #define _UFS_UFS_EXTERN_H_
35
36 struct componentname;
37 struct direct;
38 struct indir;
39 struct inode;
40 struct mount;
41 struct thread;
42 struct sockaddr;
43 struct ucred;
44 struct ufid;
45 struct vfsconf;
46 struct vnode;
47 struct vop_bmap_args;
48 struct vop_cachedlookup_args;
49 struct vop_generic_args;
50 struct vop_inactive_args;
51 struct vop_reclaim_args;
52
53 extern struct vop_vector ufs_fifoops;
54 extern struct vop_vector ufs_vnodeops;
55
56 int ufs_bmap(struct vop_bmap_args *);
57 int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *,
58 struct buf *, int *, int *);
59 int ufs_fhtovp(struct mount *, struct ufid *, int, struct vnode **);
60 int ufs_checkpath(ino_t, ino_t, struct inode *, struct ucred *, ino_t *);
61 void ufs_dirbad(struct inode *, doff_t, char *);
62 int ufs_dirbadentry(struct vnode *, struct direct *, int);
63 int ufs_dirempty(struct inode *, ino_t, struct ucred *);
64 int ufs_extread(struct vop_read_args *);
65 int ufs_extwrite(struct vop_write_args *);
66 void ufs_makedirentry(struct inode *, struct componentname *,
67 struct direct *);
68 int ufs_direnter(struct vnode *, struct vnode *, struct direct *,
69 struct componentname *, struct buf *, int);
70 int ufs_dirremove(struct vnode *, struct inode *, int, int);
71 int ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int);
72 int ufs_lookup_ino(struct vnode *, struct vnode **, struct componentname *,
73 ino_t *);
74 int ufs_getlbns(struct vnode *, ufs2_daddr_t, struct indir *, int *);
75 int ufs_inactive(struct vop_inactive_args *);
76 int ufs_init(struct vfsconf *);
77 void ufs_itimes(struct vnode *vp);
78 int ufs_lookup(struct vop_cachedlookup_args *);
79 void ufs_prepare_reclaim(struct vnode *vp);
80 int ufs_readdir(struct vop_readdir_args *);
81 int ufs_reclaim(struct vop_reclaim_args *);
82 void ffs_snapgone(struct inode *);
83 vfs_root_t ufs_root;
84 int ufs_uninit(struct vfsconf *);
85 int ufs_vinit(struct mount *, struct vop_vector *, struct vnode **);
86
87 #include <sys/kern_sysctl.h>
88 SYSCTL_DECL(_vfs_ufs);
89
90 /*
91 * Soft update function prototypes.
92 */
93 int softdep_setup_directory_add(struct buf *, struct inode *, off_t,
94 ino_t, struct buf *, int);
95 void softdep_change_directoryentry_offset(struct buf *, struct inode *,
96 caddr_t, caddr_t, caddr_t, int);
97 void softdep_setup_remove(struct buf *,struct inode *, struct inode *, int);
98 void softdep_setup_directory_change(struct buf *, struct inode *,
99 struct inode *, ino_t, int);
100 void softdep_change_linkcnt(struct inode *);
101 int softdep_slowdown(struct vnode *);
102 void softdep_setup_create(struct inode *, struct inode *);
103 void softdep_setup_dotdot_link(struct inode *, struct inode *);
104 void softdep_setup_link(struct inode *, struct inode *);
105 void softdep_setup_mkdir(struct inode *, struct inode *);
106 void softdep_setup_rmdir(struct inode *, struct inode *);
107 void softdep_setup_unlink(struct inode *, struct inode *);
108 void softdep_revert_create(struct inode *, struct inode *);
109 void softdep_revert_link(struct inode *, struct inode *);
110 void softdep_revert_mkdir(struct inode *, struct inode *);
111 void softdep_revert_rmdir(struct inode *, struct inode *);
112
113 /*
114 * Flags to low-level allocation routines. The low 16-bits are reserved
115 * for IO_ flags from vnode.h.
116 *
117 * Note: The general vfs code typically limits the sequential heuristic
118 * count to 127. See sequential_heuristic() in kern/vfs_vnops.c
119 */
120 #define BA_CLRBUF 0x00010000 /* Clear invalid areas of buffer. */
121 #define BA_METAONLY 0x00020000 /* Return indirect block buffer. */
122 #define BA_UNMAPPED 0x00040000 /* Do not mmap resulted buffer. */
123 #define BA_SEQMASK 0x7F000000 /* Bits holding seq heuristic. */
124 #define BA_SEQSHIFT 24
125 #define BA_SEQMAX 0x7F
126
127 #endif /* !_UFS_UFS_EXTERN_H_ */
ufs_makedirentry
void ufs_makedirentry(struct inode *, struct componentname *, struct direct *)
softdep_setup_unlink
void softdep_setup_unlink(struct inode *, struct inode *)
ucred
Definition: descrip.h:59
kern_sysctl.h
softdep_setup_mkdir
void softdep_setup_mkdir(struct inode *, struct inode *)
softdep_setup_directory_add
int softdep_setup_directory_add(struct buf *, struct inode *, off_t, ino_t, struct buf *, int)
softdep_setup_link
void softdep_setup_link(struct inode *, struct inode *)
ffs_snapgone
void ffs_snapgone(struct inode *)
ufs_lookup
int ufs_lookup(struct vop_cachedlookup_args *)
ufs_fhtovp
int ufs_fhtovp(struct mount *, struct ufid *, int, struct vnode **)
ufs_fifoops
struct vop_vector ufs_fifoops
softdep_revert_mkdir
void softdep_revert_mkdir(struct inode *, struct inode *)
softdep_setup_directory_change
void softdep_setup_directory_change(struct buf *, struct inode *, struct inode *, ino_t, int)
thread
Definition: thread.h:40
ufs_lookup_ino
int ufs_lookup_ino(struct vnode *, struct vnode **, struct componentname *, ino_t *)
ino_t
__ino_t ino_t
Definition: types.h:93
softdep_revert_link
void softdep_revert_link(struct inode *, struct inode *)
softdep_revert_create
void softdep_revert_create(struct inode *, struct inode *)
ufs_extwrite
int ufs_extwrite(struct vop_write_args *)
softdep_change_directoryentry_offset
void softdep_change_directoryentry_offset(struct buf *, struct inode *, caddr_t, caddr_t, caddr_t, int)
ufs_root
vfs_root_t ufs_root
Definition: ufs_extern.h:83
softdep_slowdown
int softdep_slowdown(struct vnode *)
ufs_init
int ufs_init(struct vfsconf *)
ufs_getlbns
int ufs_getlbns(struct vnode *, ufs2_daddr_t, struct indir *, int *)
softdep_setup_remove
void softdep_setup_remove(struct buf *, struct inode *, struct inode *, int)
softdep_setup_dotdot_link
void softdep_setup_dotdot_link(struct inode *, struct inode *)
inode
Definition: inode.h:39
buf
Definition: buf.h:35
softdep_setup_rmdir
void softdep_setup_rmdir(struct inode *, struct inode *)
softdep_setup_create
void softdep_setup_create(struct inode *, struct inode *)
ufs_bmap
int ufs_bmap(struct vop_bmap_args *)
ufs_dirrewrite
int ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int)
ufs_itimes
void ufs_itimes(struct vnode *vp)
ufs_vinit
int ufs_vinit(struct mount *, struct vop_vector *, struct vnode **)
SYSCTL_DECL
SYSCTL_DECL(_vfs_ufs)
caddr_t
char * caddr_t
Definition: types.h:41
ufs_vnodeops
struct vop_vector ufs_vnodeops
ufs_dirempty
int ufs_dirempty(struct inode *, ino_t, struct ucred *)
softdep_revert_rmdir
void softdep_revert_rmdir(struct inode *, struct inode *)
off_t
__int64_t off_t
Definition: types.h:119
ufs_dirremove
int ufs_dirremove(struct vnode *, struct inode *, int, int)
ufs_extread
int ufs_extread(struct vop_read_args *)
ufs_direnter
int ufs_direnter(struct vnode *, struct vnode *, struct direct *, struct componentname *, struct buf *, int)
ufs_bmaparray
int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *, struct buf *, int *, int *)
ufs_inactive
int ufs_inactive(struct vop_inactive_args *)
ufs_readdir
int ufs_readdir(struct vop_readdir_args *)
ufs_checkpath
int ufs_checkpath(ino_t, ino_t, struct inode *, struct ucred *, ino_t *)
ufs_uninit
int ufs_uninit(struct vfsconf *)
ufs_dirbadentry
int ufs_dirbadentry(struct vnode *, struct direct *, int)
softdep_change_linkcnt
void softdep_change_linkcnt(struct inode *)
ufs_dirbad
void ufs_dirbad(struct inode *, doff_t, char *)
ufs_reclaim
int ufs_reclaim(struct vop_reclaim_args *)
ufs_prepare_reclaim
void ufs_prepare_reclaim(struct vnode *vp)
ufs2_daddr_t
int64_t ufs2_daddr_t
Definition: ufs.h:87