udf_vfsops.c revision 1.6.4.3 1 1.6.4.3 yamt /* $NetBSD: udf_vfsops.c,v 1.6.4.3 2006/12/30 20:50:01 yamt Exp $ */
2 1.6.4.2 yamt
3 1.6.4.2 yamt /*
4 1.6.4.2 yamt * Copyright (c) 2006 Reinoud Zandijk
5 1.6.4.2 yamt * All rights reserved.
6 1.6.4.2 yamt *
7 1.6.4.2 yamt * Redistribution and use in source and binary forms, with or without
8 1.6.4.2 yamt * modification, are permitted provided that the following conditions
9 1.6.4.2 yamt * are met:
10 1.6.4.2 yamt * 1. Redistributions of source code must retain the above copyright
11 1.6.4.2 yamt * notice, this list of conditions and the following disclaimer.
12 1.6.4.2 yamt * 2. Redistributions in binary form must reproduce the above copyright
13 1.6.4.2 yamt * notice, this list of conditions and the following disclaimer in the
14 1.6.4.2 yamt * documentation and/or other materials provided with the distribution.
15 1.6.4.2 yamt * 3. All advertising materials mentioning features or use of this software
16 1.6.4.2 yamt * must display the following acknowledgement:
17 1.6.4.2 yamt * This product includes software developed for the
18 1.6.4.2 yamt * NetBSD Project. See http://www.NetBSD.org/ for
19 1.6.4.2 yamt * information about NetBSD.
20 1.6.4.2 yamt * 4. The name of the author may not be used to endorse or promote products
21 1.6.4.2 yamt * derived from this software without specific prior written permission.
22 1.6.4.2 yamt *
23 1.6.4.2 yamt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24 1.6.4.2 yamt * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 1.6.4.2 yamt * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 1.6.4.2 yamt * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27 1.6.4.2 yamt * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 1.6.4.2 yamt * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 1.6.4.2 yamt * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 1.6.4.2 yamt * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 1.6.4.2 yamt * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 1.6.4.2 yamt * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 1.6.4.2 yamt *
34 1.6.4.2 yamt */
35 1.6.4.2 yamt
36 1.6.4.2 yamt
37 1.6.4.2 yamt #include <sys/cdefs.h>
38 1.6.4.2 yamt #ifndef lint
39 1.6.4.3 yamt __RCSID("$NetBSD: udf_vfsops.c,v 1.6.4.3 2006/12/30 20:50:01 yamt Exp $");
40 1.6.4.2 yamt #endif /* not lint */
41 1.6.4.2 yamt
42 1.6.4.2 yamt
43 1.6.4.2 yamt #if defined(_KERNEL_OPT)
44 1.6.4.2 yamt #include "opt_quota.h"
45 1.6.4.2 yamt #include "opt_compat_netbsd.h"
46 1.6.4.2 yamt #endif
47 1.6.4.2 yamt
48 1.6.4.2 yamt #include <sys/param.h>
49 1.6.4.2 yamt #include <sys/systm.h>
50 1.6.4.2 yamt #include <sys/sysctl.h>
51 1.6.4.2 yamt #include <sys/namei.h>
52 1.6.4.2 yamt #include <sys/proc.h>
53 1.6.4.2 yamt #include <sys/kernel.h>
54 1.6.4.2 yamt #include <sys/vnode.h>
55 1.6.4.2 yamt #include <miscfs/specfs/specdev.h>
56 1.6.4.2 yamt #include <sys/mount.h>
57 1.6.4.2 yamt #include <sys/buf.h>
58 1.6.4.2 yamt #include <sys/file.h>
59 1.6.4.2 yamt #include <sys/device.h>
60 1.6.4.2 yamt #include <sys/disklabel.h>
61 1.6.4.2 yamt #include <sys/ioctl.h>
62 1.6.4.2 yamt #include <sys/malloc.h>
63 1.6.4.2 yamt #include <sys/dirent.h>
64 1.6.4.2 yamt #include <sys/stat.h>
65 1.6.4.2 yamt #include <sys/conf.h>
66 1.6.4.3 yamt #include <sys/sysctl.h>
67 1.6.4.2 yamt #include <sys/kauth.h>
68 1.6.4.2 yamt
69 1.6.4.2 yamt #include <fs/udf/ecma167-udf.h>
70 1.6.4.2 yamt #include <fs/udf/udf_mount.h>
71 1.6.4.2 yamt
72 1.6.4.2 yamt #include "udf.h"
73 1.6.4.2 yamt #include "udf_subr.h"
74 1.6.4.2 yamt #include "udf_bswap.h"
75 1.6.4.2 yamt
76 1.6.4.2 yamt
77 1.6.4.2 yamt /* verbose levels of the udf filingsystem */
78 1.6.4.2 yamt int udf_verbose = UDF_DEBUGGING;
79 1.6.4.2 yamt
80 1.6.4.2 yamt /* malloc regions */
81 1.6.4.2 yamt MALLOC_DEFINE(M_UDFMNT, "UDF mount", "UDF mount structures");
82 1.6.4.2 yamt MALLOC_DEFINE(M_UDFVOLD, "UDF volspace", "UDF volume space descriptors");
83 1.6.4.2 yamt MALLOC_DEFINE(M_UDFTEMP, "UDF temp", "UDF scrap space");
84 1.6.4.2 yamt struct pool udf_node_pool;
85 1.6.4.2 yamt
86 1.6.4.2 yamt /* supported functions predefined */
87 1.6.4.2 yamt int udf_mountroot(void);
88 1.6.4.2 yamt int udf_mount(struct mount *, const char *, void *, struct nameidata *, struct lwp *);
89 1.6.4.2 yamt int udf_start(struct mount *, int, struct lwp *);
90 1.6.4.2 yamt int udf_unmount(struct mount *, int, struct lwp *);
91 1.6.4.2 yamt int udf_root(struct mount *, struct vnode **);
92 1.6.4.2 yamt int udf_quotactl(struct mount *, int, uid_t, void *, struct lwp *);
93 1.6.4.2 yamt int udf_statvfs(struct mount *, struct statvfs *, struct lwp *);
94 1.6.4.2 yamt int udf_sync(struct mount *, int, kauth_cred_t, struct lwp *);
95 1.6.4.2 yamt int udf_vget(struct mount *, ino_t, struct vnode **);
96 1.6.4.2 yamt int udf_fhtovp(struct mount *, struct fid *, struct vnode **);
97 1.6.4.2 yamt int udf_checkexp(struct mount *, struct mbuf *, int *, kauth_cred_t *);
98 1.6.4.3 yamt int udf_vptofh(struct vnode *, struct fid *, size_t *);
99 1.6.4.2 yamt int udf_snapshot(struct mount *, struct vnode *, struct timespec *);
100 1.6.4.2 yamt
101 1.6.4.2 yamt void udf_init(void);
102 1.6.4.2 yamt void udf_reinit(void);
103 1.6.4.2 yamt void udf_done(void);
104 1.6.4.2 yamt
105 1.6.4.2 yamt
106 1.6.4.2 yamt /* internal functions */
107 1.6.4.2 yamt static int udf_mountfs(struct vnode *, struct mount *, struct lwp *, struct udf_args *);
108 1.6.4.2 yamt #if 0
109 1.6.4.2 yamt static int update_mp(struct mount *, struct udf_args *);
110 1.6.4.2 yamt #endif
111 1.6.4.2 yamt
112 1.6.4.2 yamt
113 1.6.4.2 yamt /* handies */
114 1.6.4.2 yamt #define VFSTOUDF(mp) ((struct udf_mount *)mp->mnt_data)
115 1.6.4.2 yamt
116 1.6.4.2 yamt
117 1.6.4.2 yamt /* --------------------------------------------------------------------- */
118 1.6.4.2 yamt
119 1.6.4.2 yamt /* predefine vnode-op list descriptor */
120 1.6.4.2 yamt extern const struct vnodeopv_desc udf_vnodeop_opv_desc;
121 1.6.4.2 yamt
122 1.6.4.2 yamt const struct vnodeopv_desc * const udf_vnodeopv_descs[] = {
123 1.6.4.2 yamt &udf_vnodeop_opv_desc,
124 1.6.4.2 yamt NULL,
125 1.6.4.2 yamt };
126 1.6.4.2 yamt
127 1.6.4.2 yamt
128 1.6.4.2 yamt /* vfsops descriptor linked in as anchor point for the filingsystem */
129 1.6.4.2 yamt struct vfsops udf_vfsops = {
130 1.6.4.2 yamt MOUNT_UDF, /* vfs_name */
131 1.6.4.2 yamt udf_mount,
132 1.6.4.2 yamt udf_start,
133 1.6.4.2 yamt udf_unmount,
134 1.6.4.2 yamt udf_root,
135 1.6.4.2 yamt udf_quotactl,
136 1.6.4.2 yamt udf_statvfs,
137 1.6.4.2 yamt udf_sync,
138 1.6.4.2 yamt udf_vget,
139 1.6.4.2 yamt udf_fhtovp,
140 1.6.4.2 yamt udf_vptofh,
141 1.6.4.2 yamt udf_init,
142 1.6.4.2 yamt udf_reinit,
143 1.6.4.2 yamt udf_done,
144 1.6.4.2 yamt udf_mountroot,
145 1.6.4.2 yamt udf_snapshot,
146 1.6.4.2 yamt vfs_stdextattrctl,
147 1.6.4.2 yamt udf_vnodeopv_descs,
148 1.6.4.3 yamt 0, /* int vfs_refcount */
149 1.6.4.3 yamt { NULL, NULL, }, /* LIST_ENTRY(vfsops) */
150 1.6.4.2 yamt };
151 1.6.4.2 yamt VFS_ATTACH(udf_vfsops);
152 1.6.4.2 yamt
153 1.6.4.2 yamt
154 1.6.4.2 yamt /* --------------------------------------------------------------------- */
155 1.6.4.2 yamt
156 1.6.4.2 yamt /* file system starts here */
157 1.6.4.2 yamt void
158 1.6.4.2 yamt udf_init(void)
159 1.6.4.2 yamt {
160 1.6.4.2 yamt size_t size;
161 1.6.4.2 yamt
162 1.6.4.2 yamt #ifdef _LKM
163 1.6.4.2 yamt malloc_type_attach(M_UDFMNT);
164 1.6.4.2 yamt malloc_type_attach(M_UDFVOLD);
165 1.6.4.2 yamt malloc_type_attach(M_UDFTEMP);
166 1.6.4.2 yamt #endif
167 1.6.4.2 yamt
168 1.6.4.2 yamt /* init hashtables and pools */
169 1.6.4.2 yamt size = sizeof(struct udf_node);
170 1.6.4.2 yamt pool_init(&udf_node_pool, size, 0, 0, 0, "udf_node_pool", NULL);
171 1.6.4.2 yamt }
172 1.6.4.2 yamt
173 1.6.4.2 yamt /* --------------------------------------------------------------------- */
174 1.6.4.2 yamt
175 1.6.4.2 yamt void
176 1.6.4.2 yamt udf_reinit(void)
177 1.6.4.2 yamt {
178 1.6.4.2 yamt /* recreate hashtables */
179 1.6.4.2 yamt /* reinit pool? */
180 1.6.4.2 yamt }
181 1.6.4.2 yamt
182 1.6.4.2 yamt /* --------------------------------------------------------------------- */
183 1.6.4.2 yamt
184 1.6.4.2 yamt void
185 1.6.4.2 yamt udf_done(void)
186 1.6.4.2 yamt {
187 1.6.4.2 yamt /* remove hashtables and pools */
188 1.6.4.2 yamt pool_destroy(&udf_node_pool);
189 1.6.4.2 yamt
190 1.6.4.2 yamt #ifdef _LKM
191 1.6.4.2 yamt malloc_type_detach(M_UDFMNT);
192 1.6.4.2 yamt malloc_type_detach(M_UDFVOLD);
193 1.6.4.2 yamt malloc_type_detach(M_UDFTEMP);
194 1.6.4.2 yamt #endif
195 1.6.4.2 yamt }
196 1.6.4.2 yamt
197 1.6.4.2 yamt /* --------------------------------------------------------------------- */
198 1.6.4.2 yamt
199 1.6.4.2 yamt int
200 1.6.4.2 yamt udf_mountroot(void)
201 1.6.4.2 yamt {
202 1.6.4.2 yamt return EOPNOTSUPP;
203 1.6.4.2 yamt }
204 1.6.4.2 yamt
205 1.6.4.2 yamt /* --------------------------------------------------------------------- */
206 1.6.4.2 yamt
207 1.6.4.2 yamt #define MPFREE(a, lst) \
208 1.6.4.2 yamt if ((a)) free((a), lst);
209 1.6.4.2 yamt static void
210 1.6.4.2 yamt free_udf_mountinfo(struct mount *mp)
211 1.6.4.2 yamt {
212 1.6.4.2 yamt struct udf_mount *ump;
213 1.6.4.2 yamt int i;
214 1.6.4.2 yamt
215 1.6.4.3 yamt if (!mp)
216 1.6.4.3 yamt return;
217 1.6.4.3 yamt
218 1.6.4.2 yamt ump = VFSTOUDF(mp);
219 1.6.4.2 yamt if (ump) {
220 1.6.4.3 yamt /* dispose of our descriptor pool */
221 1.6.4.3 yamt if (ump->desc_pool) {
222 1.6.4.3 yamt pool_destroy(ump->desc_pool);
223 1.6.4.3 yamt free(ump->desc_pool, M_UDFMNT);
224 1.6.4.3 yamt }
225 1.6.4.3 yamt
226 1.6.4.3 yamt /* clear our data */
227 1.6.4.2 yamt for (i = 0; i < UDF_ANCHORS; i++)
228 1.6.4.2 yamt MPFREE(ump->anchors[i], M_UDFVOLD);
229 1.6.4.2 yamt MPFREE(ump->primary_vol, M_UDFVOLD);
230 1.6.4.2 yamt MPFREE(ump->logical_vol, M_UDFVOLD);
231 1.6.4.2 yamt MPFREE(ump->unallocated, M_UDFVOLD);
232 1.6.4.2 yamt MPFREE(ump->implementation, M_UDFVOLD);
233 1.6.4.2 yamt MPFREE(ump->logvol_integrity, M_UDFVOLD);
234 1.6.4.2 yamt for (i = 0; i < UDF_PARTITIONS; i++)
235 1.6.4.2 yamt MPFREE(ump->partitions[i], M_UDFVOLD);
236 1.6.4.2 yamt MPFREE(ump->fileset_desc, M_UDFVOLD);
237 1.6.4.2 yamt MPFREE(ump->vat_table, M_UDFVOLD);
238 1.6.4.2 yamt MPFREE(ump->sparing_table, M_UDFVOLD);
239 1.6.4.2 yamt
240 1.6.4.2 yamt free(ump, M_UDFMNT);
241 1.6.4.2 yamt }
242 1.6.4.2 yamt }
243 1.6.4.2 yamt #undef MPFREE
244 1.6.4.2 yamt
245 1.6.4.2 yamt /* --------------------------------------------------------------------- */
246 1.6.4.2 yamt
247 1.6.4.2 yamt int
248 1.6.4.2 yamt udf_mount(struct mount *mp, const char *path,
249 1.6.4.2 yamt void *data, struct nameidata *ndp, struct lwp *l)
250 1.6.4.2 yamt {
251 1.6.4.2 yamt struct udf_args args;
252 1.6.4.2 yamt struct udf_mount *ump;
253 1.6.4.2 yamt struct vnode *devvp;
254 1.6.4.2 yamt int openflags, accessmode, error;
255 1.6.4.2 yamt
256 1.6.4.2 yamt DPRINTF(CALL, ("udf_mount called\n"));
257 1.6.4.2 yamt
258 1.6.4.2 yamt if (mp->mnt_flag & MNT_GETARGS) {
259 1.6.4.2 yamt /* request for the mount arguments */
260 1.6.4.2 yamt ump = VFSTOUDF(mp);
261 1.6.4.2 yamt if (ump == NULL)
262 1.6.4.2 yamt return EINVAL;
263 1.6.4.2 yamt return copyout(&ump->mount_args, data, sizeof(args));
264 1.6.4.2 yamt }
265 1.6.4.2 yamt
266 1.6.4.2 yamt /* handle request for updating mount parameters */
267 1.6.4.2 yamt /* TODO can't update my mountpoint yet */
268 1.6.4.2 yamt if (mp->mnt_flag & MNT_UPDATE) {
269 1.6.4.2 yamt return EOPNOTSUPP;
270 1.6.4.2 yamt }
271 1.6.4.2 yamt
272 1.6.4.3 yamt /* OK, so we are asked to mount the device */
273 1.6.4.2 yamt error = copyin(data, &args, sizeof(struct udf_args));
274 1.6.4.2 yamt if (error)
275 1.6.4.2 yamt return error;
276 1.6.4.2 yamt
277 1.6.4.2 yamt /* check/translate struct version */
278 1.6.4.2 yamt /* TODO sanity checking other mount arguments */
279 1.6.4.2 yamt if (args.version != 1) {
280 1.6.4.2 yamt printf("mount_udf: unrecognized argument structure version\n");
281 1.6.4.2 yamt return EINVAL;
282 1.6.4.2 yamt }
283 1.6.4.2 yamt
284 1.6.4.2 yamt /* lookup name to get its vnode */
285 1.6.4.3 yamt NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, l);
286 1.6.4.2 yamt error = namei(ndp);
287 1.6.4.2 yamt if (error)
288 1.6.4.2 yamt return error;
289 1.6.4.2 yamt devvp = ndp->ni_vp;
290 1.6.4.3 yamt
291 1.6.4.2 yamt #ifdef DEBUG
292 1.6.4.2 yamt if (udf_verbose & UDF_DEBUG_VOLUMES)
293 1.6.4.2 yamt vprint("UDF mount, trying to mount \n", devvp);
294 1.6.4.2 yamt #endif
295 1.6.4.2 yamt
296 1.6.4.2 yamt /* check if its a block device specified */
297 1.6.4.2 yamt if (devvp->v_type != VBLK) {
298 1.6.4.2 yamt vrele(devvp);
299 1.6.4.2 yamt return ENOTBLK;
300 1.6.4.2 yamt }
301 1.6.4.2 yamt if (bdevsw_lookup(devvp->v_rdev) == NULL) {
302 1.6.4.2 yamt vrele(devvp);
303 1.6.4.2 yamt return ENXIO;
304 1.6.4.2 yamt }
305 1.6.4.2 yamt
306 1.6.4.2 yamt /* force read-only for now */
307 1.6.4.2 yamt mp->mnt_flag |= MNT_RDONLY;
308 1.6.4.2 yamt
309 1.6.4.2 yamt /*
310 1.6.4.2 yamt * If mount by non-root, then verify that user has necessary
311 1.6.4.2 yamt * permissions on the device.
312 1.6.4.2 yamt */
313 1.6.4.3 yamt if (kauth_cred_geteuid(l->l_cred) != 0) {
314 1.6.4.2 yamt accessmode = VREAD;
315 1.6.4.2 yamt if ((mp->mnt_flag & MNT_RDONLY) == 0)
316 1.6.4.2 yamt accessmode |= VWRITE;
317 1.6.4.3 yamt vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
318 1.6.4.3 yamt error = VOP_ACCESS(devvp, accessmode, l->l_cred, l);
319 1.6.4.3 yamt VOP_UNLOCK(devvp, 0);
320 1.6.4.2 yamt if (error) {
321 1.6.4.3 yamt vrele(devvp);
322 1.6.4.3 yamt return error;
323 1.6.4.2 yamt }
324 1.6.4.2 yamt }
325 1.6.4.2 yamt
326 1.6.4.2 yamt /*
327 1.6.4.2 yamt * Disallow multiple mounts of the same device. Disallow mounting of
328 1.6.4.2 yamt * a device that is currently in use (except for root, which might
329 1.6.4.2 yamt * share swap device for miniroot).
330 1.6.4.2 yamt */
331 1.6.4.2 yamt error = vfs_mountedon(devvp);
332 1.6.4.2 yamt if (error) {
333 1.6.4.3 yamt vrele(devvp);
334 1.6.4.2 yamt return error;
335 1.6.4.2 yamt }
336 1.6.4.2 yamt if ((vcount(devvp) > 1) && (devvp != rootvp)) {
337 1.6.4.3 yamt vrele(devvp);
338 1.6.4.2 yamt return EBUSY;
339 1.6.4.2 yamt }
340 1.6.4.2 yamt
341 1.6.4.2 yamt /*
342 1.6.4.2 yamt * Open device and try to mount it!
343 1.6.4.2 yamt */
344 1.6.4.2 yamt if (mp->mnt_flag & MNT_RDONLY) {
345 1.6.4.2 yamt openflags = FREAD;
346 1.6.4.2 yamt } else {
347 1.6.4.2 yamt openflags = FREAD | FWRITE;
348 1.6.4.2 yamt }
349 1.6.4.2 yamt error = VOP_OPEN(devvp, openflags, FSCRED, l);
350 1.6.4.2 yamt if (error == 0) {
351 1.6.4.2 yamt /* opened ok, try mounting */
352 1.6.4.2 yamt error = udf_mountfs(devvp, mp, l, &args);
353 1.6.4.2 yamt if (error) {
354 1.6.4.2 yamt free_udf_mountinfo(mp);
355 1.6.4.3 yamt vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
356 1.6.4.2 yamt (void) VOP_CLOSE(devvp, openflags, NOCRED, l);
357 1.6.4.3 yamt VOP_UNLOCK(devvp, 0);
358 1.6.4.2 yamt }
359 1.6.4.2 yamt }
360 1.6.4.2 yamt if (error) {
361 1.6.4.2 yamt /* devvp is still locked */
362 1.6.4.3 yamt vrele(devvp);
363 1.6.4.2 yamt return error;
364 1.6.4.2 yamt }
365 1.6.4.2 yamt
366 1.6.4.2 yamt /* register our mountpoint being on this device */
367 1.6.4.2 yamt devvp->v_specmountpoint = mp;
368 1.6.4.2 yamt
369 1.6.4.2 yamt /* successfully mounted */
370 1.6.4.2 yamt DPRINTF(VOLUMES, ("udf_mount() successfull\n"));
371 1.6.4.2 yamt
372 1.6.4.3 yamt return set_statvfs_info(path, UIO_USERSPACE, args.fspec, UIO_USERSPACE,
373 1.6.4.3 yamt mp, l);
374 1.6.4.2 yamt }
375 1.6.4.2 yamt
376 1.6.4.2 yamt /* --------------------------------------------------------------------- */
377 1.6.4.2 yamt
378 1.6.4.2 yamt #ifdef DEBUG
379 1.6.4.2 yamt static void
380 1.6.4.2 yamt udf_unmount_sanity_check(struct mount *mp)
381 1.6.4.2 yamt {
382 1.6.4.2 yamt struct vnode *vp;
383 1.6.4.2 yamt
384 1.6.4.2 yamt printf("On unmount, i found the following nodes:\n");
385 1.6.4.3 yamt TAILQ_FOREACH(vp, &mp->mnt_vnodelist, v_mntvnodes) {
386 1.6.4.2 yamt vprint("", vp);
387 1.6.4.2 yamt if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) {
388 1.6.4.2 yamt printf(" is locked\n");
389 1.6.4.2 yamt }
390 1.6.4.2 yamt if (vp->v_usecount > 1)
391 1.6.4.2 yamt printf(" more than one usecount %d\n", vp->v_usecount);
392 1.6.4.2 yamt }
393 1.6.4.2 yamt }
394 1.6.4.2 yamt #endif
395 1.6.4.2 yamt
396 1.6.4.2 yamt
397 1.6.4.2 yamt int
398 1.6.4.2 yamt udf_unmount(struct mount *mp, int mntflags, struct lwp *l)
399 1.6.4.2 yamt {
400 1.6.4.2 yamt struct udf_mount *ump;
401 1.6.4.2 yamt int error, flags, closeflags;
402 1.6.4.2 yamt
403 1.6.4.2 yamt DPRINTF(CALL, ("udf_umount called\n"));
404 1.6.4.2 yamt
405 1.6.4.2 yamt /*
406 1.6.4.2 yamt * By specifying SKIPSYSTEM we can skip vnodes marked with VSYSTEM.
407 1.6.4.2 yamt * This hardly documented feature allows us to exempt certain files
408 1.6.4.2 yamt * from being flushed.
409 1.6.4.2 yamt */
410 1.6.4.2 yamt flags = SKIPSYSTEM; /* allow for system vnodes to stay alive */
411 1.6.4.2 yamt if (mntflags & MNT_FORCE)
412 1.6.4.2 yamt flags |= FORCECLOSE;
413 1.6.4.2 yamt
414 1.6.4.2 yamt ump = VFSTOUDF(mp);
415 1.6.4.2 yamt if (!ump)
416 1.6.4.2 yamt panic("UDF unmount: empty ump\n");
417 1.6.4.2 yamt
418 1.6.4.2 yamt /* TODO remove these paranoid functions */
419 1.6.4.2 yamt #ifdef DEBUG
420 1.6.4.2 yamt if (udf_verbose & UDF_DEBUG_LOCKING)
421 1.6.4.2 yamt udf_unmount_sanity_check(mp);
422 1.6.4.2 yamt #endif
423 1.6.4.2 yamt
424 1.6.4.2 yamt if ((error = vflush(mp, NULLVP, flags)) != 0)
425 1.6.4.2 yamt return error;
426 1.6.4.2 yamt
427 1.6.4.2 yamt #ifdef DEBUG
428 1.6.4.2 yamt if (udf_verbose & UDF_DEBUG_LOCKING)
429 1.6.4.2 yamt udf_unmount_sanity_check(mp);
430 1.6.4.2 yamt #endif
431 1.6.4.2 yamt
432 1.6.4.2 yamt DPRINTF(VOLUMES, ("flush OK\n"));
433 1.6.4.2 yamt
434 1.6.4.2 yamt /*
435 1.6.4.2 yamt * TODO close logical volume and close session if requested.
436 1.6.4.2 yamt *
437 1.6.4.2 yamt * XXX no system nodes defined yet. Code to reclaim them is calling
438 1.6.4.2 yamt * VOP_RECLAIM on the nodes themselves.
439 1.6.4.2 yamt */
440 1.6.4.2 yamt
441 1.6.4.2 yamt /* close device */
442 1.6.4.2 yamt DPRINTF(VOLUMES, ("closing device\n"));
443 1.6.4.2 yamt if (mp->mnt_flag & MNT_RDONLY) {
444 1.6.4.2 yamt closeflags = FREAD;
445 1.6.4.2 yamt } else {
446 1.6.4.2 yamt closeflags = FREAD | FWRITE;
447 1.6.4.2 yamt }
448 1.6.4.2 yamt
449 1.6.4.2 yamt /* devvp is still locked by us */
450 1.6.4.2 yamt vn_lock(ump->devvp, LK_EXCLUSIVE | LK_RETRY);
451 1.6.4.2 yamt error = VOP_CLOSE(ump->devvp, closeflags, NOCRED, l);
452 1.6.4.2 yamt if (error)
453 1.6.4.2 yamt printf("Error during closure of device! error %d, "
454 1.6.4.2 yamt "device might stay locked\n", error);
455 1.6.4.2 yamt DPRINTF(VOLUMES, ("device close ok\n"));
456 1.6.4.2 yamt
457 1.6.4.2 yamt /* clear our mount reference and release device node */
458 1.6.4.2 yamt ump->devvp->v_specmountpoint = NULL;
459 1.6.4.2 yamt vput(ump->devvp);
460 1.6.4.2 yamt
461 1.6.4.2 yamt /* free up umt structure */
462 1.6.4.2 yamt free_udf_mountinfo(mp);
463 1.6.4.2 yamt
464 1.6.4.3 yamt /* free ump struct reference */
465 1.6.4.3 yamt mp->mnt_data = NULL;
466 1.6.4.3 yamt mp->mnt_flag &= ~MNT_LOCAL;
467 1.6.4.3 yamt
468 1.6.4.2 yamt DPRINTF(VOLUMES, ("Fin unmount\n"));
469 1.6.4.2 yamt return error;
470 1.6.4.2 yamt }
471 1.6.4.2 yamt
472 1.6.4.2 yamt /* --------------------------------------------------------------------- */
473 1.6.4.2 yamt
474 1.6.4.2 yamt /*
475 1.6.4.2 yamt * Helper function of udf_mount() that actually mounts the disc.
476 1.6.4.2 yamt */
477 1.6.4.2 yamt
478 1.6.4.2 yamt static int
479 1.6.4.2 yamt udf_mountfs(struct vnode *devvp, struct mount *mp,
480 1.6.4.2 yamt struct lwp *l, struct udf_args *args)
481 1.6.4.2 yamt {
482 1.6.4.2 yamt struct udf_mount *ump;
483 1.6.4.2 yamt uint32_t sector_size, lb_size, bshift;
484 1.6.4.2 yamt int num_anchors, error, lst;
485 1.6.4.2 yamt
486 1.6.4.2 yamt /* flush out any old buffers remaining from a previous use. */
487 1.6.4.3 yamt if ((error = vinvalbuf(devvp, V_SAVE, l->l_cred, l, 0, 0)))
488 1.6.4.2 yamt return error;
489 1.6.4.2 yamt
490 1.6.4.2 yamt /* allocate udf part of mount structure; malloc allways succeeds */
491 1.6.4.2 yamt ump = malloc(sizeof(struct udf_mount), M_UDFMNT, M_WAITOK);
492 1.6.4.2 yamt memset(ump, 0, sizeof(struct udf_mount));
493 1.6.4.2 yamt
494 1.6.4.2 yamt /* init locks */
495 1.6.4.2 yamt simple_lock_init(&ump->ihash_slock);
496 1.6.4.2 yamt lockinit(&ump->get_node_lock, PINOD, "udf_getnode", 0, 0);
497 1.6.4.2 yamt
498 1.6.4.2 yamt /* init `ino_t' to udf_node hash table */
499 1.6.4.2 yamt for (lst = 0; lst < UDF_INODE_HASHSIZE; lst++) {
500 1.6.4.2 yamt LIST_INIT(&ump->udf_nodes[lst]);
501 1.6.4.2 yamt }
502 1.6.4.2 yamt
503 1.6.4.2 yamt /* set up linkage */
504 1.6.4.2 yamt mp->mnt_data = ump;
505 1.6.4.2 yamt ump->vfs_mountp = mp;
506 1.6.4.2 yamt
507 1.6.4.2 yamt /* set up arguments and device */
508 1.6.4.2 yamt ump->mount_args = *args;
509 1.6.4.2 yamt ump->devvp = devvp;
510 1.6.4.3 yamt if ((error = udf_update_discinfo(ump))) {
511 1.6.4.2 yamt printf("UDF mount: error inspecting fs node\n");
512 1.6.4.2 yamt return error;
513 1.6.4.2 yamt }
514 1.6.4.2 yamt
515 1.6.4.2 yamt /* inspect sector size */
516 1.6.4.2 yamt sector_size = ump->discinfo.sector_size;
517 1.6.4.2 yamt bshift = 1;
518 1.6.4.2 yamt while ((1 << bshift) < sector_size)
519 1.6.4.2 yamt bshift++;
520 1.6.4.2 yamt if ((1 << bshift) != sector_size) {
521 1.6.4.2 yamt printf("UDF mount: "
522 1.6.4.2 yamt "hit NetBSD implementation fence on sector size\n");
523 1.6.4.2 yamt return EIO;
524 1.6.4.2 yamt }
525 1.6.4.2 yamt
526 1.6.4.2 yamt /* read all anchors to get volume descriptor sequence */
527 1.6.4.2 yamt num_anchors = udf_read_anchors(ump, args);
528 1.6.4.2 yamt if (num_anchors == 0)
529 1.6.4.2 yamt return ENOENT;
530 1.6.4.2 yamt
531 1.6.4.2 yamt DPRINTF(VOLUMES, ("Read %d anchors on this disc, session %d\n",
532 1.6.4.2 yamt num_anchors, args->sessionnr));
533 1.6.4.2 yamt
534 1.6.4.2 yamt /* read in volume descriptor sequence */
535 1.6.4.3 yamt if ((error = udf_read_vds_space(ump))) {
536 1.6.4.2 yamt printf("UDF mount: error reading volume space\n");
537 1.6.4.3 yamt return error;
538 1.6.4.3 yamt }
539 1.6.4.2 yamt
540 1.6.4.2 yamt /* check consistency and completeness */
541 1.6.4.3 yamt if ((error = udf_process_vds(ump, args))) {
542 1.6.4.3 yamt printf("UDF mount: disc not properly formatted\n");
543 1.6.4.3 yamt return error;
544 1.6.4.2 yamt }
545 1.6.4.2 yamt
546 1.6.4.2 yamt /*
547 1.6.4.2 yamt * Initialise pool for descriptors associated with nodes. This is done
548 1.6.4.2 yamt * in lb_size units though currently lb_size is dictated to be
549 1.6.4.2 yamt * sector_size.
550 1.6.4.2 yamt */
551 1.6.4.2 yamt lb_size = udf_rw32(ump->logical_vol->lb_size);
552 1.6.4.3 yamt ump->desc_pool = malloc(sizeof(struct pool), M_UDFMNT, M_WAITOK);
553 1.6.4.3 yamt memset(ump->desc_pool, 0, sizeof(struct pool));
554 1.6.4.3 yamt pool_init(ump->desc_pool, lb_size, 0, 0, 0, "udf_desc_pool", NULL);
555 1.6.4.2 yamt
556 1.6.4.2 yamt /* read vds support tables like VAT, sparable etc. */
557 1.6.4.3 yamt if ((error = udf_read_vds_tables(ump, args))) {
558 1.6.4.3 yamt printf("UDF mount: error in format or damaged disc\n");
559 1.6.4.3 yamt return error;
560 1.6.4.2 yamt }
561 1.6.4.3 yamt
562 1.6.4.3 yamt if ((error = udf_read_rootdirs(ump, args))) {
563 1.6.4.3 yamt printf("UDF mount: "
564 1.6.4.3 yamt "disc not properly formatted or damaged disc\n");
565 1.6.4.2 yamt return error;
566 1.6.4.3 yamt }
567 1.6.4.2 yamt
568 1.6.4.2 yamt /* setup rest of mount information */
569 1.6.4.2 yamt mp->mnt_data = ump;
570 1.6.4.2 yamt mp->mnt_stat.f_fsidx.__fsid_val[0] = (uint32_t) devvp->v_rdev;
571 1.6.4.2 yamt mp->mnt_stat.f_fsidx.__fsid_val[1] = makefstype(MOUNT_UDF);
572 1.6.4.2 yamt mp->mnt_stat.f_fsid = mp->mnt_stat.f_fsidx.__fsid_val[0];
573 1.6.4.2 yamt mp->mnt_stat.f_namemax = UDF_MAX_NAMELEN;
574 1.6.4.2 yamt mp->mnt_flag |= MNT_LOCAL;
575 1.6.4.2 yamt
576 1.6.4.2 yamt /* bshift is allways equal to disc sector size */
577 1.6.4.2 yamt mp->mnt_dev_bshift = bshift;
578 1.6.4.2 yamt mp->mnt_fs_bshift = bshift;
579 1.6.4.2 yamt
580 1.6.4.2 yamt /* do we have to set this? */
581 1.6.4.2 yamt devvp->v_specmountpoint = mp;
582 1.6.4.2 yamt
583 1.6.4.2 yamt /* success! */
584 1.6.4.2 yamt return 0;
585 1.6.4.2 yamt }
586 1.6.4.2 yamt
587 1.6.4.2 yamt /* --------------------------------------------------------------------- */
588 1.6.4.2 yamt
589 1.6.4.2 yamt int
590 1.6.4.2 yamt udf_start(struct mount *mp, int flags, struct lwp *l)
591 1.6.4.2 yamt {
592 1.6.4.2 yamt /* do we have to do something here? */
593 1.6.4.2 yamt return 0;
594 1.6.4.2 yamt }
595 1.6.4.2 yamt
596 1.6.4.2 yamt /* --------------------------------------------------------------------- */
597 1.6.4.2 yamt
598 1.6.4.2 yamt int
599 1.6.4.2 yamt udf_root(struct mount *mp, struct vnode **vpp)
600 1.6.4.2 yamt {
601 1.6.4.2 yamt struct vnode *vp;
602 1.6.4.2 yamt struct long_ad *dir_loc;
603 1.6.4.2 yamt struct udf_mount *ump = VFSTOUDF(mp);
604 1.6.4.2 yamt struct udf_node *root_dir;
605 1.6.4.2 yamt int error;
606 1.6.4.2 yamt
607 1.6.4.2 yamt DPRINTF(CALL, ("udf_root called\n"));
608 1.6.4.2 yamt
609 1.6.4.2 yamt dir_loc = &ump->fileset_desc->rootdir_icb;
610 1.6.4.2 yamt error = udf_get_node(ump, dir_loc, &root_dir);
611 1.6.4.2 yamt
612 1.6.4.2 yamt if (!root_dir)
613 1.6.4.2 yamt error = ENOENT;
614 1.6.4.2 yamt if (error)
615 1.6.4.2 yamt return error;
616 1.6.4.2 yamt
617 1.6.4.2 yamt vp = root_dir->vnode;
618 1.6.4.2 yamt simple_lock(&vp->v_interlock);
619 1.6.4.2 yamt root_dir->vnode->v_flag |= VROOT;
620 1.6.4.2 yamt simple_unlock(&vp->v_interlock);
621 1.6.4.2 yamt
622 1.6.4.2 yamt *vpp = vp;
623 1.6.4.2 yamt return 0;
624 1.6.4.2 yamt }
625 1.6.4.2 yamt
626 1.6.4.2 yamt /* --------------------------------------------------------------------- */
627 1.6.4.2 yamt
628 1.6.4.2 yamt int
629 1.6.4.3 yamt udf_quotactl(struct mount *mp, int cmds, uid_t uid,
630 1.6.4.3 yamt void *arg, struct lwp *l)
631 1.6.4.2 yamt {
632 1.6.4.2 yamt DPRINTF(NOTIMPL, ("udf_quotactl called\n"));
633 1.6.4.2 yamt return EOPNOTSUPP;
634 1.6.4.2 yamt }
635 1.6.4.2 yamt
636 1.6.4.2 yamt /* --------------------------------------------------------------------- */
637 1.6.4.2 yamt
638 1.6.4.2 yamt int
639 1.6.4.2 yamt udf_statvfs(struct mount *mp, struct statvfs *sbp, struct lwp *l)
640 1.6.4.2 yamt {
641 1.6.4.2 yamt struct udf_mount *ump = VFSTOUDF(mp);
642 1.6.4.2 yamt struct logvol_int_desc *lvid;
643 1.6.4.2 yamt struct udf_logvol_info *impl;
644 1.6.4.2 yamt uint64_t freeblks, sizeblks;
645 1.6.4.2 yamt uint32_t *pos1, *pos2;
646 1.6.4.2 yamt int part, num_part;
647 1.6.4.2 yamt
648 1.6.4.2 yamt DPRINTF(CALL, ("udf_statvfs called\n"));
649 1.6.4.2 yamt sbp->f_flag = mp->mnt_flag;
650 1.6.4.2 yamt sbp->f_bsize = ump->discinfo.sector_size;
651 1.6.4.2 yamt sbp->f_frsize = ump->discinfo.sector_size;
652 1.6.4.2 yamt sbp->f_iosize = ump->discinfo.sector_size;
653 1.6.4.2 yamt
654 1.6.4.2 yamt /* TODO integrity locking */
655 1.6.4.2 yamt /* free and used space for mountpoint based on logvol integrity */
656 1.6.4.2 yamt lvid = ump->logvol_integrity;
657 1.6.4.2 yamt if (lvid) {
658 1.6.4.2 yamt num_part = udf_rw32(lvid->num_part);
659 1.6.4.2 yamt impl = (struct udf_logvol_info *) (lvid->tables + 2*num_part);
660 1.6.4.2 yamt
661 1.6.4.2 yamt freeblks = sizeblks = 0;
662 1.6.4.2 yamt for (part=0; part < num_part; part++) {
663 1.6.4.2 yamt pos1 = &lvid->tables[0] + part;
664 1.6.4.2 yamt pos2 = &lvid->tables[0] + num_part + part;
665 1.6.4.2 yamt if (udf_rw32(*pos1) != (uint32_t) -1) {
666 1.6.4.2 yamt freeblks += udf_rw32(*pos1);
667 1.6.4.2 yamt sizeblks += udf_rw32(*pos2);
668 1.6.4.2 yamt }
669 1.6.4.2 yamt }
670 1.6.4.2 yamt sbp->f_blocks = sizeblks;
671 1.6.4.2 yamt sbp->f_bfree = freeblks;
672 1.6.4.2 yamt sbp->f_files = udf_rw32(impl->num_files);
673 1.6.4.2 yamt sbp->f_files += udf_rw32(impl->num_directories);
674 1.6.4.2 yamt
675 1.6.4.2 yamt /* XXX read only for now XXX */
676 1.6.4.2 yamt sbp->f_bavail = 0;
677 1.6.4.2 yamt sbp->f_bresvd = 0;
678 1.6.4.2 yamt
679 1.6.4.2 yamt /* tricky, next only aplies to ffs i think, so set to zero */
680 1.6.4.2 yamt sbp->f_ffree = 0;
681 1.6.4.2 yamt sbp->f_favail = 0;
682 1.6.4.2 yamt sbp->f_fresvd = 0;
683 1.6.4.2 yamt }
684 1.6.4.2 yamt
685 1.6.4.2 yamt copy_statvfs_info(sbp, mp);
686 1.6.4.2 yamt return 0;
687 1.6.4.2 yamt }
688 1.6.4.2 yamt
689 1.6.4.2 yamt /* --------------------------------------------------------------------- */
690 1.6.4.2 yamt
691 1.6.4.2 yamt int
692 1.6.4.3 yamt udf_sync(struct mount *mp, int waitfor,
693 1.6.4.3 yamt kauth_cred_t cred, struct lwp *p)
694 1.6.4.2 yamt {
695 1.6.4.2 yamt DPRINTF(CALL, ("udf_sync called\n"));
696 1.6.4.2 yamt /* nothing to be done as upto now read-only */
697 1.6.4.2 yamt return 0;
698 1.6.4.2 yamt }
699 1.6.4.2 yamt
700 1.6.4.2 yamt /* --------------------------------------------------------------------- */
701 1.6.4.2 yamt
702 1.6.4.2 yamt /*
703 1.6.4.2 yamt * Get vnode for the file system type specific file id ino for the fs. Its
704 1.6.4.2 yamt * used for reference to files by unique ID and for NFSv3.
705 1.6.4.2 yamt * (optional) TODO lookup why some sources state NFSv3
706 1.6.4.2 yamt */
707 1.6.4.2 yamt int
708 1.6.4.3 yamt udf_vget(struct mount *mp, ino_t ino,
709 1.6.4.3 yamt struct vnode **vpp)
710 1.6.4.2 yamt {
711 1.6.4.2 yamt DPRINTF(NOTIMPL, ("udf_vget called\n"));
712 1.6.4.2 yamt return EOPNOTSUPP;
713 1.6.4.2 yamt }
714 1.6.4.2 yamt
715 1.6.4.2 yamt /* --------------------------------------------------------------------- */
716 1.6.4.2 yamt
717 1.6.4.2 yamt /*
718 1.6.4.2 yamt * Lookup vnode for file handle specified
719 1.6.4.2 yamt */
720 1.6.4.2 yamt int
721 1.6.4.3 yamt udf_fhtovp(struct mount *mp, struct fid *fhp,
722 1.6.4.3 yamt struct vnode **vpp)
723 1.6.4.2 yamt {
724 1.6.4.2 yamt DPRINTF(NOTIMPL, ("udf_fhtovp called\n"));
725 1.6.4.2 yamt return EOPNOTSUPP;
726 1.6.4.2 yamt }
727 1.6.4.2 yamt
728 1.6.4.2 yamt /* --------------------------------------------------------------------- */
729 1.6.4.2 yamt
730 1.6.4.2 yamt /*
731 1.6.4.2 yamt * Create an unique file handle. Its structure is opaque and won't be used by
732 1.6.4.2 yamt * other subsystems. It should uniquely identify the file in the filingsystem
733 1.6.4.2 yamt * and enough information to know if a file has been removed and/or resources
734 1.6.4.2 yamt * have been recycled.
735 1.6.4.2 yamt */
736 1.6.4.2 yamt int
737 1.6.4.3 yamt udf_vptofh(struct vnode *vp, struct fid *fid,
738 1.6.4.3 yamt size_t *fh_size)
739 1.6.4.2 yamt {
740 1.6.4.2 yamt DPRINTF(NOTIMPL, ("udf_vptofh called\n"));
741 1.6.4.2 yamt return EOPNOTSUPP;
742 1.6.4.2 yamt }
743 1.6.4.2 yamt
744 1.6.4.2 yamt /* --------------------------------------------------------------------- */
745 1.6.4.2 yamt
746 1.6.4.2 yamt /*
747 1.6.4.2 yamt * Create a filingsystem snapshot at the specified timestamp. Could be
748 1.6.4.2 yamt * implemented by explicitly creating a new session or with spare room in the
749 1.6.4.2 yamt * integrity descriptor space
750 1.6.4.2 yamt */
751 1.6.4.2 yamt int
752 1.6.4.3 yamt udf_snapshot(struct mount *mp, struct vnode *vp,
753 1.6.4.3 yamt struct timespec *tm)
754 1.6.4.2 yamt {
755 1.6.4.2 yamt DPRINTF(NOTIMPL, ("udf_snapshot called\n"));
756 1.6.4.2 yamt return EOPNOTSUPP;
757 1.6.4.2 yamt }
758 1.6.4.2 yamt
759 1.6.4.3 yamt /* --------------------------------------------------------------------- */
760 1.6.4.3 yamt
761 1.6.4.3 yamt /*
762 1.6.4.3 yamt * If running a DEBUG kernel, provide an easy way to set the debug flags when
763 1.6.4.3 yamt * running into a problem.
764 1.6.4.3 yamt */
765 1.6.4.3 yamt
766 1.6.4.3 yamt #ifdef DEBUG
767 1.6.4.3 yamt #define UDF_VERBOSE_SYSCTLOPT 1
768 1.6.4.3 yamt
769 1.6.4.3 yamt SYSCTL_SETUP(sysctl_vfs_udf_setup, "sysctl vfs.udf subtree setup")
770 1.6.4.3 yamt {
771 1.6.4.3 yamt /*
772 1.6.4.3 yamt * XXX the "24" below could be dynamic, thereby eliminating one
773 1.6.4.3 yamt * more instance of the "number to vfs" mapping problem, but
774 1.6.4.3 yamt * "24" is the order as taken from sys/mount.h
775 1.6.4.3 yamt */
776 1.6.4.3 yamt
777 1.6.4.3 yamt sysctl_createv(clog, 0, NULL, NULL,
778 1.6.4.3 yamt CTLFLAG_PERMANENT,
779 1.6.4.3 yamt CTLTYPE_NODE, "vfs", NULL,
780 1.6.4.3 yamt NULL, 0, NULL, 0,
781 1.6.4.3 yamt CTL_VFS, CTL_EOL);
782 1.6.4.3 yamt sysctl_createv(clog, 0, NULL, NULL,
783 1.6.4.3 yamt CTLFLAG_PERMANENT,
784 1.6.4.3 yamt CTLTYPE_NODE, "udf",
785 1.6.4.3 yamt SYSCTL_DESCR("OSTA Universal File System"),
786 1.6.4.3 yamt NULL, 0, NULL, 0,
787 1.6.4.3 yamt CTL_VFS, 24, CTL_EOL);
788 1.6.4.3 yamt
789 1.6.4.3 yamt sysctl_createv(clog, 0, NULL, NULL,
790 1.6.4.3 yamt CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
791 1.6.4.3 yamt CTLTYPE_INT, "verbose",
792 1.6.4.3 yamt SYSCTL_DESCR("Bitmask for filesystem debugging"),
793 1.6.4.3 yamt NULL, 0, &udf_verbose, 0,
794 1.6.4.3 yamt CTL_VFS, 24, UDF_VERBOSE_SYSCTLOPT, CTL_EOL);
795 1.6.4.3 yamt }
796 1.6.4.3 yamt
797 1.6.4.3 yamt #endif /* DEBUG */
798 1.6.4.2 yamt
799