]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
8ad349bb | 2 | * Copyright (c) 2006 Apple Computer, Inc. All Rights Reserved. |
1c79356b | 3 | * |
8ad349bb | 4 | * @APPLE_LICENSE_OSREFERENCE_HEADER_START@ |
1c79356b | 5 | * |
8ad349bb A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. The rights granted to you under the | |
10 | * License may not be used to create, or enable the creation or | |
11 | * redistribution of, unlawful or unlicensed copies of an Apple operating | |
12 | * system, or to circumvent, violate, or enable the circumvention or | |
13 | * violation of, any terms of an Apple operating system software license | |
14 | * agreement. | |
15 | * | |
16 | * Please obtain a copy of the License at | |
17 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
18 | * file. | |
19 | * | |
20 | * The Original Code and all software distributed under the License are | |
21 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
22 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
23 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
24 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
25 | * Please see the License for the specific language governing rights and | |
26 | * limitations under the License. | |
27 | * | |
28 | * @APPLE_LICENSE_OSREFERENCE_HEADER_END@ | |
1c79356b A |
29 | */ |
30 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | |
31 | ||
32 | /*- | |
33 | * Copyright (c) 1991, 1993, 1994 | |
34 | * The Regents of the University of California. All rights reserved. | |
35 | * | |
36 | * Redistribution and use in source and binary forms, with or without | |
37 | * modification, are permitted provided that the following conditions | |
38 | * are met: | |
39 | * 1. Redistributions of source code must retain the above copyright | |
40 | * notice, this list of conditions and the following disclaimer. | |
41 | * 2. Redistributions in binary form must reproduce the above copyright | |
42 | * notice, this list of conditions and the following disclaimer in the | |
43 | * documentation and/or other materials provided with the distribution. | |
44 | * 3. All advertising materials mentioning features or use of this software | |
45 | * must display the following acknowledgement: | |
46 | * This product includes software developed by the University of | |
47 | * California, Berkeley and its contributors. | |
48 | * 4. Neither the name of the University nor the names of its contributors | |
49 | * may be used to endorse or promote products derived from this software | |
50 | * without specific prior written permission. | |
51 | * | |
52 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
53 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
54 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | |
63 | * | |
64 | * @(#)ffs_extern.h 8.6 (Berkeley) 3/30/95 | |
65 | */ | |
9bccf70c A |
66 | #ifndef __UFS_FFS_FFS_EXTERN_H__ |
67 | #define __UFS_FFS_FFS_EXTERN_H__ | |
1c79356b | 68 | |
9bccf70c A |
69 | #include <sys/appleapiopts.h> |
70 | ||
71 | #ifdef __APPLE_API_UNSTABLE | |
1c79356b A |
72 | /* |
73 | * Sysctl values for the fast filesystem. | |
74 | */ | |
75 | #define FFS_CLUSTERREAD 1 /* cluster reading enabled */ | |
76 | #define FFS_CLUSTERWRITE 2 /* cluster writing enabled */ | |
77 | #define FFS_REALLOCBLKS 3 /* block reallocation enabled */ | |
78 | #define FFS_ASYNCFREE 4 /* asynchronous block freeing enabled */ | |
79 | #define FFS_MAXID 5 /* number of valid ffs ids */ | |
80 | ||
81 | #define FFS_NAMES { \ | |
82 | { 0, 0 }, \ | |
83 | { "doclusterread", CTLTYPE_INT }, \ | |
84 | { "doclusterwrite", CTLTYPE_INT }, \ | |
85 | { "doreallocblks", CTLTYPE_INT }, \ | |
86 | { "doasyncfree", CTLTYPE_INT }, \ | |
87 | } | |
9bccf70c | 88 | #endif /* __APPLE_API_UNSTABLE */ |
1c79356b A |
89 | |
90 | struct buf; | |
1c79356b A |
91 | struct fs; |
92 | struct inode; | |
93 | struct mount; | |
94 | struct nameidata; | |
95 | struct proc; | |
91447636 | 96 | struct vfsstatfs; |
1c79356b A |
97 | struct timeval; |
98 | struct ucred; | |
99 | struct uio; | |
100 | struct vnode; | |
101 | struct mbuf; | |
102 | struct vfsconf; | |
103 | ||
9bccf70c | 104 | #ifdef __APPLE_API_PRIVATE |
1c79356b | 105 | __BEGIN_DECLS |
91447636 A |
106 | int ffs_fsync_internal(vnode_t, int); |
107 | ||
108 | int ffs_blkatoff(vnode_t, off_t, char **, buf_t *); | |
109 | ||
110 | int ffs_alloc(struct inode *, | |
111 | ufs_daddr_t, ufs_daddr_t, int, struct ucred *, ufs_daddr_t *); | |
112 | int ffs_balloc(struct inode *, | |
113 | ufs_daddr_t, int, struct ucred *, struct buf **, int, int *); | |
114 | void ffs_blkfree(struct inode *, ufs_daddr_t, long); | |
115 | ufs_daddr_t ffs_blkpref(struct inode *, ufs_daddr_t, int, ufs_daddr_t *); | |
116 | void ffs_clrblock(struct fs *, u_char *, ufs_daddr_t); | |
117 | int ffs_fhtovp(struct mount *, int, unsigned char *, struct vnode **, vfs_context_t); | |
118 | void ffs_fragacct(struct fs *, int, int32_t [], int); | |
119 | int ffs_fsync(struct vnop_fsync_args *); | |
120 | int ffs_init(struct vfsconf *); | |
121 | int ffs_isblock(struct fs *, u_char *, ufs_daddr_t); | |
122 | int ffs_mount(struct mount *, vnode_t , user_addr_t, vfs_context_t); | |
123 | int ffs_mountfs(struct vnode *, struct mount *, vfs_context_t); | |
124 | int ffs_mountroot(mount_t, vnode_t, vfs_context_t); | |
125 | int ffs_read(struct vnop_read_args *); | |
126 | int ffs_realloccg(struct inode *, | |
127 | ufs_daddr_t, ufs_daddr_t, int, int, struct ucred *, struct buf **); | |
128 | int ffs_reclaim(struct vnop_reclaim_args *); | |
129 | void ffs_setblock(struct fs *, u_char *, ufs_daddr_t); | |
130 | int ffs_vfs_getattr(struct mount *, struct vfs_attr *, vfs_context_t); | |
131 | int ffs_vfs_setattr(struct mount *, struct vfs_attr *, vfs_context_t); | |
132 | int ffs_sync(struct mount *, int, vfs_context_t); | |
133 | int ffs_sysctl(int *, u_int, user_addr_t, size_t *, user_addr_t, size_t, vfs_context_t); | |
134 | int ffs_unmount(struct mount *, int, vfs_context_t); | |
135 | int ffs_update(struct vnode *, struct timeval *, struct timeval *, int); | |
136 | int ffs_valloc(vnode_t dvp, mode_t mode, kauth_cred_t cred, vnode_t *vpp); | |
137 | int ffs_vfree(struct vnode *vp, ino_t ino, int mode); | |
138 | int ffs_vget(struct mount *, ino64_t, struct vnode **, vfs_context_t); | |
139 | int ffs_vptofh(struct vnode *, int *, unsigned char *, vfs_context_t); | |
140 | int ffs_write(struct vnop_write_args *); | |
141 | int ffs_pagein(struct vnop_pagein_args *); | |
142 | int ffs_pageout(struct vnop_pageout_args *); | |
143 | int ffs_blktooff(struct vnop_blktooff_args *); | |
144 | int ffs_offtoblk(struct vnop_offtoblk_args *); | |
1c79356b | 145 | |
1c79356b A |
146 | __END_DECLS |
147 | ||
148 | extern int (**ffs_vnodeop_p)(void *); | |
149 | extern int (**ffs_specop_p)(void *); | |
150 | #if FIFO | |
151 | extern int (**ffs_fifoop_p)(void *); | |
152 | #define FFS_FIFOOPS ffs_fifoop_p | |
153 | #else | |
154 | #define FFS_FIFOOPS NULL | |
155 | #endif | |
9bccf70c A |
156 | |
157 | #endif /* __APPLE_API_PRIVATE */ | |
158 | #endif /* __UFS_FFS_FFS_EXTERN_H__ */ |