kernel tree reorganization stage 1: Major cvs repository work (not logged as
[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  * $DragonFly: src/sys/vfs/ufs/ffs_softdep_stub.c,v 1.4 2003/08/07 21:17:44 dillon Exp $
37  */
38
39 /* 
40  * Use this file as ffs_softdep.c if you do not wish the real ffs_softdep.c
41  * to be included in your system. (e.g for legal reasons )
42  * The real files are in /usr/src/contrib/sys/softupdates.
43  * You must copy them here before you can use soft updates.
44  * Read the README for legal and technical information.
45  */
46
47 #include "opt_ffs.h"
48 #if (SOFTUPDATES == 0 ) /* SOFTUPDATES not configured in, use these stubs. */
49 #include <sys/param.h>
50 #include <sys/systm.h>
51 #include <sys/malloc.h>
52 #include <sys/vnode.h>
53 #include "quota.h"
54 #include "inode.h"
55 #include "ffs_extern.h"
56 #include "ufs_extern.h"
57
58 int
59 softdep_flushfiles(struct mount *oldmnt, int flags, thread_t td)
60 {
61         panic("softdep_flushfiles called");
62 }
63
64 int
65 softdep_mount(struct vnode *devvp, struct mount *mp, struct fs *fs)
66 {
67         return (0);
68 }
69
70 void 
71 softdep_initialize(void)
72 {
73         /* empty */
74 }
75
76 void
77 softdep_setup_inomapdep(bp, ip, newinum)
78         struct buf *bp;
79         struct inode *ip;
80         ino_t newinum;
81 {
82
83         panic("softdep_setup_inomapdep called");
84 }
85
86 void
87 softdep_setup_blkmapdep(bp, fs, newblkno)
88         struct buf *bp;
89         struct fs *fs;
90         ufs_daddr_t newblkno;
91 {
92
93         panic("softdep_setup_blkmapdep called");
94 }
95
96 void 
97 softdep_setup_allocdirect(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp)
98         struct inode *ip;
99         ufs_lbn_t lbn;
100         ufs_daddr_t newblkno;
101         ufs_daddr_t oldblkno;
102         long newsize;
103         long oldsize;
104         struct buf *bp;
105 {
106         
107         panic("softdep_setup_allocdirect called");
108 }
109
110 void
111 softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp)
112         struct inode *ip;
113         ufs_lbn_t lbn;
114         struct buf *bp;
115         int ptrno;
116         ufs_daddr_t newblkno;
117         ufs_daddr_t oldblkno;
118         struct buf *nbp;
119 {
120
121         panic("softdep_setup_allocindir_page called");
122 }
123
124 void
125 softdep_setup_allocindir_meta(nbp, ip, bp, ptrno, newblkno)
126         struct buf *nbp;
127         struct inode *ip;
128         struct buf *bp;
129         int ptrno;
130         ufs_daddr_t newblkno;
131 {
132
133         panic("softdep_setup_allocindir_meta called");
134 }
135
136 void
137 softdep_setup_freeblocks(ip, length)
138         struct inode *ip;
139         off_t length;
140 {
141         
142         panic("softdep_setup_freeblocks called");
143 }
144
145 /* XXX needed to change this for FreeBSD.. hit poul */
146 void
147 softdep_freefile(pvp, ino, mode)
148                 struct vnode *pvp;
149                 ino_t ino;
150                 int mode;
151 {
152
153         panic("softdep_freefile called");
154 }
155
156 void 
157 softdep_setup_directory_add(bp, dp, diroffset, newinum, newdirbp)
158         struct buf *bp;
159         struct inode *dp;
160         off_t diroffset;
161         long newinum;
162         struct buf *newdirbp;
163 {
164
165         panic("softdep_setup_directory_add called");
166 }
167
168 void 
169 softdep_change_directoryentry_offset(dp, base, oldloc, newloc, entrysize)
170         struct inode *dp;
171         caddr_t base;
172         caddr_t oldloc;
173         caddr_t newloc;
174         int entrysize;
175 {
176
177         panic("softdep_change_directoryentry_offset called");
178 }
179
180 void 
181 softdep_setup_remove(bp, dp, ip, isrmdir)
182         struct buf *bp;
183         struct inode *dp;
184         struct inode *ip;
185         int isrmdir;
186 {
187         
188         panic("softdep_setup_remove called");
189 }
190
191 void 
192 softdep_setup_directory_change(bp, dp, ip, newinum, isrmdir)
193         struct buf *bp;
194         struct inode *dp;
195         struct inode *ip;
196         long newinum;
197         int isrmdir;
198 {
199
200         panic("softdep_setup_directory_change called");
201 }
202
203 void
204 softdep_change_linkcnt(ip)
205         struct inode *ip;
206 {
207
208         panic("softdep_change_linkcnt called");
209 }
210
211 void 
212 softdep_load_inodeblock(ip)
213         struct inode *ip;
214 {
215
216         panic("softdep_load_inodeblock called");
217 }
218
219 void 
220 softdep_update_inodeblock(ip, bp, waitfor)
221         struct inode *ip;
222         struct buf *bp;
223         int waitfor;
224 {
225
226         panic("softdep_update_inodeblock called");
227 }
228
229 void
230 softdep_fsync_mountdev(vp)
231         struct vnode *vp;
232 {
233
234         return;
235 }
236
237 int
238 softdep_sync_metadata(ap)
239         struct vop_fsync_args /* {
240                 struct vnode *a_vp;
241                 struct ucred *a_cred;
242                 int a_waitfor;
243                 struct proc *a_p;
244         } */ *ap;
245 {
246
247         return (0);
248 }
249
250 int
251 softdep_slowdown(vp)
252         struct vnode *vp;
253 {
254         panic("softdep_slowdown called");
255 }
256 #endif  /* SOFTUPDATES not configured in */