DEV messaging stage 2/4: In this stage all DEV commands are now being
[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.2 2003/06/17 04:28:59 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 <ufs/ufs/quota.h>
54 #include <ufs/ufs/inode.h>
55 #include <ufs/ffs/ffs_extern.h>
56 #include <ufs/ufs/ufs_extern.h>
57
58 int
59 softdep_flushfiles(oldmnt, flags, p)
60         struct mount *oldmnt;
61         int flags;
62         struct proc *p;
63 {
64
65         panic("softdep_flushfiles called");
66 }
67
68 int
69 softdep_mount(devvp, mp, fs, cred)
70         struct vnode *devvp;
71         struct mount *mp;
72         struct fs *fs;
73         struct ucred *cred;
74 {
75
76         return (0);
77 }
78
79 void 
80 softdep_initialize()
81 {
82
83         return;
84 }
85
86 void
87 softdep_setup_inomapdep(bp, ip, newinum)
88         struct buf *bp;
89         struct inode *ip;
90         ino_t newinum;
91 {
92
93         panic("softdep_setup_inomapdep called");
94 }
95
96 void
97 softdep_setup_blkmapdep(bp, fs, newblkno)
98         struct buf *bp;
99         struct fs *fs;
100         ufs_daddr_t newblkno;
101 {
102
103         panic("softdep_setup_blkmapdep called");
104 }
105
106 void 
107 softdep_setup_allocdirect(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp)
108         struct inode *ip;
109         ufs_lbn_t lbn;
110         ufs_daddr_t newblkno;
111         ufs_daddr_t oldblkno;
112         long newsize;
113         long oldsize;
114         struct buf *bp;
115 {
116         
117         panic("softdep_setup_allocdirect called");
118 }
119
120 void
121 softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp)
122         struct inode *ip;
123         ufs_lbn_t lbn;
124         struct buf *bp;
125         int ptrno;
126         ufs_daddr_t newblkno;
127         ufs_daddr_t oldblkno;
128         struct buf *nbp;
129 {
130
131         panic("softdep_setup_allocindir_page called");
132 }
133
134 void
135 softdep_setup_allocindir_meta(nbp, ip, bp, ptrno, newblkno)
136         struct buf *nbp;
137         struct inode *ip;
138         struct buf *bp;
139         int ptrno;
140         ufs_daddr_t newblkno;
141 {
142
143         panic("softdep_setup_allocindir_meta called");
144 }
145
146 void
147 softdep_setup_freeblocks(ip, length)
148         struct inode *ip;
149         off_t length;
150 {
151         
152         panic("softdep_setup_freeblocks called");
153 }
154
155 /* XXX needed to change this for FreeBSD.. hit poul */
156 void
157 softdep_freefile(pvp, ino, mode)
158                 struct vnode *pvp;
159                 ino_t ino;
160                 int mode;
161 {
162
163         panic("softdep_freefile called");
164 }
165
166 void 
167 softdep_setup_directory_add(bp, dp, diroffset, newinum, newdirbp)
168         struct buf *bp;
169         struct inode *dp;
170         off_t diroffset;
171         long newinum;
172         struct buf *newdirbp;
173 {
174
175         panic("softdep_setup_directory_add called");
176 }
177
178 void 
179 softdep_change_directoryentry_offset(dp, base, oldloc, newloc, entrysize)
180         struct inode *dp;
181         caddr_t base;
182         caddr_t oldloc;
183         caddr_t newloc;
184         int entrysize;
185 {
186
187         panic("softdep_change_directoryentry_offset called");
188 }
189
190 void 
191 softdep_setup_remove(bp, dp, ip, isrmdir)
192         struct buf *bp;
193         struct inode *dp;
194         struct inode *ip;
195         int isrmdir;
196 {
197         
198         panic("softdep_setup_remove called");
199 }
200
201 void 
202 softdep_setup_directory_change(bp, dp, ip, newinum, isrmdir)
203         struct buf *bp;
204         struct inode *dp;
205         struct inode *ip;
206         long newinum;
207         int isrmdir;
208 {
209
210         panic("softdep_setup_directory_change called");
211 }
212
213 void
214 softdep_change_linkcnt(ip)
215         struct inode *ip;
216 {
217
218         panic("softdep_change_linkcnt called");
219 }
220
221 void 
222 softdep_load_inodeblock(ip)
223         struct inode *ip;
224 {
225
226         panic("softdep_load_inodeblock called");
227 }
228
229 void 
230 softdep_update_inodeblock(ip, bp, waitfor)
231         struct inode *ip;
232         struct buf *bp;
233         int waitfor;
234 {
235
236         panic("softdep_update_inodeblock called");
237 }
238
239 void
240 softdep_fsync_mountdev(vp)
241         struct vnode *vp;
242 {
243
244         return;
245 }
246
247 int
248 softdep_sync_metadata(ap)
249         struct vop_fsync_args /* {
250                 struct vnode *a_vp;
251                 struct ucred *a_cred;
252                 int a_waitfor;
253                 struct proc *a_p;
254         } */ *ap;
255 {
256
257         return (0);
258 }
259
260 int
261 softdep_slowdown(vp)
262         struct vnode *vp;
263 {
264         panic("softdep_slowdown called");
265 }
266 #endif  /* SOFTUPDATES not configured in */