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