Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / vfs / ufs / ffs_softdep_stub.c
1
2 /*
3  * Copyright 1998 Marshall Kirk McKusick. All Rights Reserved.
4  *
5  * The soft updates code is derived from the appendix of a University
6  * of Michigan technical report (Gregory R. Ganger and Yale N. Patt,
7  * "Soft Updates: A Solution to the Metadata Update Problem in File
8  * Systems", CSE-TR-254-95, August 1995).
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  * 3. None of the names of McKusick, Ganger, or the University of Michigan
19  *    may be used to endorse or promote products derived from this software
20  *    without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY MARSHALL KIRK MCKUSICK ``AS IS'' AND
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED.  IN NO EVENT SHALL MARSHALL KIRK MCKUSICK BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32  * SUCH DAMAGE.
33  *
34  *      from: @(#)ffs_softdep_stub.c    9.1 (McKusick) 7/10/97
35  * $FreeBSD: src/sys/ufs/ffs/ffs_softdep_stub.c,v 1.7.2.1 2000/12/28 11:01:45 ps Exp $
36  */
37
38 /* 
39  * Use this file as ffs_softdep.c if you do not wish the real ffs_softdep.c
40  * to be included in your system. (e.g for legal reasons )
41  * The real files are in /usr/src/contrib/sys/softupdates.
42  * You must copy them here before you can use soft updates.
43  * Read the README for legal and technical information.
44  */
45
46 #include "opt_ffs.h"
47 #if (SOFTUPDATES == 0 ) /* SOFTUPDATES not configured in, use these stubs. */
48 #include <sys/param.h>
49 #include <sys/systm.h>
50 #include <sys/malloc.h>
51 #include <sys/vnode.h>
52 #include <ufs/ufs/quota.h>
53 #include <ufs/ufs/inode.h>
54 #include <ufs/ffs/ffs_extern.h>
55 #include <ufs/ufs/ufs_extern.h>
56
57 int
58 softdep_flushfiles(oldmnt, flags, p)
59         struct mount *oldmnt;
60         int flags;
61         struct proc *p;
62 {
63
64         panic("softdep_flushfiles called");
65 }
66
67 int
68 softdep_mount(devvp, mp, fs, cred)
69         struct vnode *devvp;
70         struct mount *mp;
71         struct fs *fs;
72         struct ucred *cred;
73 {
74
75         return (0);
76 }
77
78 void 
79 softdep_initialize()
80 {
81
82         return;
83 }
84
85 void
86 softdep_setup_inomapdep(bp, ip, newinum)
87         struct buf *bp;
88         struct inode *ip;
89         ino_t newinum;
90 {
91
92         panic("softdep_setup_inomapdep called");
93 }
94
95 void
96 softdep_setup_blkmapdep(bp, fs, newblkno)
97         struct buf *bp;
98         struct fs *fs;
99         ufs_daddr_t newblkno;
100 {
101
102         panic("softdep_setup_blkmapdep called");
103 }
104
105 void 
106 softdep_setup_allocdirect(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp)
107         struct inode *ip;
108         ufs_lbn_t lbn;
109         ufs_daddr_t newblkno;
110         ufs_daddr_t oldblkno;
111         long newsize;
112         long oldsize;
113         struct buf *bp;
114 {
115         
116         panic("softdep_setup_allocdirect called");
117 }
118
119 void
120 softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp)
121         struct inode *ip;
122         ufs_lbn_t lbn;
123         struct buf *bp;
124         int ptrno;
125         ufs_daddr_t newblkno;
126         ufs_daddr_t oldblkno;
127         struct buf *nbp;
128 {
129
130         panic("softdep_setup_allocindir_page called");
131 }
132
133 void
134 softdep_setup_allocindir_meta(nbp, ip, bp, ptrno, newblkno)
135         struct buf *nbp;
136         struct inode *ip;
137         struct buf *bp;
138         int ptrno;
139         ufs_daddr_t newblkno;
140 {
141
142         panic("softdep_setup_allocindir_meta called");
143 }
144
145 void
146 softdep_setup_freeblocks(ip, length)
147         struct inode *ip;
148         off_t length;
149 {
150         
151         panic("softdep_setup_freeblocks called");
152 }
153
154 /* XXX needed to change this for FreeBSD.. hit poul */
155 void
156 softdep_freefile(pvp, ino, mode)
157                 struct vnode *pvp;
158                 ino_t ino;
159                 int mode;
160 {
161
162         panic("softdep_freefile called");
163 }
164
165 void 
166 softdep_setup_directory_add(bp, dp, diroffset, newinum, newdirbp)
167         struct buf *bp;
168         struct inode *dp;
169         off_t diroffset;
170         long newinum;
171         struct buf *newdirbp;
172 {
173
174         panic("softdep_setup_directory_add called");
175 }
176
177 void 
178 softdep_change_directoryentry_offset(dp, base, oldloc, newloc, entrysize)
179         struct inode *dp;
180         caddr_t base;
181         caddr_t oldloc;
182         caddr_t newloc;
183         int entrysize;
184 {
185
186         panic("softdep_change_directoryentry_offset called");
187 }
188
189 void 
190 softdep_setup_remove(bp, dp, ip, isrmdir)
191         struct buf *bp;
192         struct inode *dp;
193         struct inode *ip;
194         int isrmdir;
195 {
196         
197         panic("softdep_setup_remove called");
198 }
199
200 void 
201 softdep_setup_directory_change(bp, dp, ip, newinum, isrmdir)
202         struct buf *bp;
203         struct inode *dp;
204         struct inode *ip;
205         long newinum;
206         int isrmdir;
207 {
208
209         panic("softdep_setup_directory_change called");
210 }
211
212 void
213 softdep_change_linkcnt(ip)
214         struct inode *ip;
215 {
216
217         panic("softdep_change_linkcnt called");
218 }
219
220 void 
221 softdep_load_inodeblock(ip)
222         struct inode *ip;
223 {
224
225         panic("softdep_load_inodeblock called");
226 }
227
228 void 
229 softdep_update_inodeblock(ip, bp, waitfor)
230         struct inode *ip;
231         struct buf *bp;
232         int waitfor;
233 {
234
235         panic("softdep_update_inodeblock called");
236 }
237
238 void
239 softdep_fsync_mountdev(vp)
240         struct vnode *vp;
241 {
242
243         return;
244 }
245
246 int
247 softdep_sync_metadata(ap)
248         struct vop_fsync_args /* {
249                 struct vnode *a_vp;
250                 struct ucred *a_cred;
251                 int a_waitfor;
252                 struct proc *a_p;
253         } */ *ap;
254 {
255
256         return (0);
257 }
258
259 int
260 softdep_slowdown(vp)
261         struct vnode *vp;
262 {
263         panic("softdep_slowdown called");
264 }
265 #endif  /* SOFTUPDATES not configured in */