Home | History | Annotate | Line # | Download | only in umapfs
umap_vfsops.c revision 1.22
      1  1.22  perseant /*	$NetBSD: umap_vfsops.c,v 1.22 1999/03/19 21:46:26 perseant Exp $	*/
      2   1.2       cgd 
      3   1.1   mycroft /*
      4   1.1   mycroft  * Copyright (c) 1992, 1993
      5   1.1   mycroft  *	The Regents of the University of California.  All rights reserved.
      6   1.1   mycroft  *
      7   1.1   mycroft  * This code is derived from software donated to Berkeley by
      8   1.1   mycroft  * the UCLA Ficus project.
      9   1.1   mycroft  *
     10   1.1   mycroft  * Redistribution and use in source and binary forms, with or without
     11   1.1   mycroft  * modification, are permitted provided that the following conditions
     12   1.1   mycroft  * are met:
     13   1.1   mycroft  * 1. Redistributions of source code must retain the above copyright
     14   1.1   mycroft  *    notice, this list of conditions and the following disclaimer.
     15   1.1   mycroft  * 2. Redistributions in binary form must reproduce the above copyright
     16   1.1   mycroft  *    notice, this list of conditions and the following disclaimer in the
     17   1.1   mycroft  *    documentation and/or other materials provided with the distribution.
     18   1.1   mycroft  * 3. All advertising materials mentioning features or use of this software
     19   1.1   mycroft  *    must display the following acknowledgement:
     20   1.1   mycroft  *	This product includes software developed by the University of
     21   1.1   mycroft  *	California, Berkeley and its contributors.
     22   1.1   mycroft  * 4. Neither the name of the University nor the names of its contributors
     23   1.1   mycroft  *    may be used to endorse or promote products derived from this software
     24   1.1   mycroft  *    without specific prior written permission.
     25   1.1   mycroft  *
     26   1.1   mycroft  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     27   1.1   mycroft  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     28   1.1   mycroft  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     29   1.1   mycroft  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     30   1.1   mycroft  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     31   1.1   mycroft  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     32   1.1   mycroft  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     33   1.1   mycroft  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     34   1.1   mycroft  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     35   1.1   mycroft  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     36   1.1   mycroft  * SUCH DAMAGE.
     37   1.1   mycroft  *
     38   1.1   mycroft  *	from: @(#)null_vfsops.c       1.5 (Berkeley) 7/10/92
     39  1.18      fvdl  *	@(#)umap_vfsops.c	8.8 (Berkeley) 5/14/95
     40   1.1   mycroft  */
     41   1.1   mycroft 
     42   1.1   mycroft /*
     43   1.1   mycroft  * Umap Layer
     44   1.1   mycroft  * (See mount_umap(8) for a description of this layer.)
     45   1.1   mycroft  */
     46   1.1   mycroft 
     47   1.1   mycroft #include <sys/param.h>
     48   1.1   mycroft #include <sys/systm.h>
     49  1.18      fvdl #include <sys/proc.h>
     50   1.1   mycroft #include <sys/time.h>
     51   1.1   mycroft #include <sys/types.h>
     52   1.1   mycroft #include <sys/vnode.h>
     53   1.1   mycroft #include <sys/mount.h>
     54   1.1   mycroft #include <sys/namei.h>
     55   1.1   mycroft #include <sys/malloc.h>
     56   1.1   mycroft #include <miscfs/umapfs/umap.h>
     57   1.1   mycroft 
     58  1.12       cgd int	umapfs_mount __P((struct mount *, const char *, void *,
     59   1.9  christos 			  struct nameidata *, struct proc *));
     60   1.9  christos int	umapfs_start __P((struct mount *, int, struct proc *));
     61   1.9  christos int	umapfs_unmount __P((struct mount *, int, struct proc *));
     62   1.9  christos int	umapfs_root __P((struct mount *, struct vnode **));
     63   1.9  christos int	umapfs_quotactl __P((struct mount *, int, uid_t, caddr_t,
     64   1.9  christos 			     struct proc *));
     65   1.9  christos int	umapfs_statfs __P((struct mount *, struct statfs *, struct proc *));
     66   1.9  christos int	umapfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
     67   1.9  christos int	umapfs_vget __P((struct mount *, ino_t, struct vnode **));
     68  1.20  wrstuden int	umapfs_fhtovp __P((struct mount *, struct fid *, struct vnode **));
     69  1.20  wrstuden int	umapfs_checkexp __P((struct mount *, struct mbuf *, int *,
     70  1.20  wrstuden 			   struct ucred **));
     71   1.9  christos int	umapfs_vptofh __P((struct vnode *, struct fid *));
     72  1.18      fvdl int	umapfs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
     73  1.18      fvdl 			   struct proc *));
     74   1.9  christos 
     75   1.1   mycroft /*
     76   1.1   mycroft  * Mount umap layer
     77   1.1   mycroft  */
     78   1.1   mycroft int
     79   1.1   mycroft umapfs_mount(mp, path, data, ndp, p)
     80   1.1   mycroft 	struct mount *mp;
     81  1.12       cgd 	const char *path;
     82  1.12       cgd 	void *data;
     83   1.1   mycroft 	struct nameidata *ndp;
     84   1.1   mycroft 	struct proc *p;
     85   1.1   mycroft {
     86   1.1   mycroft 	struct umap_args args;
     87   1.1   mycroft 	struct vnode *lowerrootvp, *vp;
     88   1.1   mycroft 	struct vnode *umapm_rootvp;
     89   1.1   mycroft 	struct umap_mount *amp;
     90   1.7   mycroft 	size_t size;
     91   1.1   mycroft 	int error;
     92  1.22  perseant #ifdef UMAPFS_DIAGNOSTIC
     93  1.22  perseant 	int i;
     94  1.22  perseant #endif
     95  1.21    bouyer 
     96  1.21    bouyer 	/* only for root */
     97  1.21    bouyer 	if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
     98  1.21    bouyer 		return error;
     99   1.1   mycroft 
    100   1.1   mycroft #ifdef UMAPFS_DIAGNOSTIC
    101  1.15  christos 	printf("umapfs_mount(mp = %p)\n", mp);
    102   1.1   mycroft #endif
    103   1.1   mycroft 
    104   1.1   mycroft 	/*
    105   1.1   mycroft 	 * Update is a no-op
    106   1.1   mycroft 	 */
    107   1.1   mycroft 	if (mp->mnt_flag & MNT_UPDATE) {
    108   1.1   mycroft 		return (EOPNOTSUPP);
    109   1.1   mycroft 		/* return (VFS_MOUNT(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, path, data, ndp, p));*/
    110   1.1   mycroft 	}
    111   1.1   mycroft 
    112   1.1   mycroft 	/*
    113   1.1   mycroft 	 * Get argument
    114   1.1   mycroft 	 */
    115   1.9  christos 	error = copyin(data, (caddr_t)&args, sizeof(struct umap_args));
    116   1.9  christos 	if (error)
    117   1.1   mycroft 		return (error);
    118   1.1   mycroft 
    119   1.1   mycroft 	/*
    120   1.1   mycroft 	 * Find lower node
    121   1.1   mycroft 	 */
    122   1.1   mycroft 	NDINIT(ndp, LOOKUP, FOLLOW|WANTPARENT|LOCKLEAF,
    123   1.1   mycroft 		UIO_USERSPACE, args.target, p);
    124   1.9  christos 	if ((error = namei(ndp)) != 0)
    125   1.1   mycroft 		return (error);
    126   1.1   mycroft 
    127   1.1   mycroft 	/*
    128   1.1   mycroft 	 * Sanity check on lower vnode
    129   1.1   mycroft 	 */
    130   1.1   mycroft 	lowerrootvp = ndp->ni_vp;
    131   1.1   mycroft #ifdef UMAPFS_DIAGNOSTIC
    132  1.15  christos 	printf("vp = %p, check for VDIR...\n", lowerrootvp);
    133   1.1   mycroft #endif
    134   1.1   mycroft 	vrele(ndp->ni_dvp);
    135   1.1   mycroft 	ndp->ni_dvp = 0;
    136   1.1   mycroft 
    137   1.1   mycroft 	if (lowerrootvp->v_type != VDIR) {
    138   1.1   mycroft 		vput(lowerrootvp);
    139   1.1   mycroft 		return (EINVAL);
    140   1.1   mycroft 	}
    141   1.1   mycroft 
    142   1.1   mycroft #ifdef UMAPFS_DIAGNOSTIC
    143  1.15  christos 	printf("mp = %p\n", mp);
    144   1.1   mycroft #endif
    145   1.1   mycroft 
    146   1.1   mycroft 	amp = (struct umap_mount *) malloc(sizeof(struct umap_mount),
    147   1.1   mycroft 				M_UFSMNT, M_WAITOK);	/* XXX */
    148   1.1   mycroft 
    149   1.1   mycroft 	/*
    150   1.1   mycroft 	 * Save reference to underlying FS
    151   1.1   mycroft 	 */
    152   1.1   mycroft 	amp->umapm_vfs = lowerrootvp->v_mount;
    153   1.1   mycroft 
    154   1.1   mycroft 	/*
    155   1.1   mycroft 	 * Now copy in the number of entries and maps for umap mapping.
    156   1.1   mycroft 	 */
    157   1.1   mycroft 	amp->info_nentries = args.nentries;
    158   1.1   mycroft 	amp->info_gnentries = args.gnentries;
    159   1.1   mycroft 	error = copyin(args.mapdata, (caddr_t)amp->info_mapdata,
    160   1.1   mycroft 	    2*sizeof(u_long)*args.nentries);
    161   1.1   mycroft 	if (error)
    162   1.1   mycroft 		return (error);
    163   1.1   mycroft 
    164  1.22  perseant #ifdef UMAPFS_DIAGNOSTIC
    165  1.11  christos 	printf("umap_mount:nentries %d\n",args.nentries);
    166   1.1   mycroft 	for (i = 0; i < args.nentries; i++)
    167  1.22  perseant 		printf("   %ld maps to %ld\n", amp->info_mapdata[i][0],
    168   1.1   mycroft 	 	    amp->info_mapdata[i][1]);
    169   1.1   mycroft #endif
    170   1.1   mycroft 
    171   1.1   mycroft 	error = copyin(args.gmapdata, (caddr_t)amp->info_gmapdata,
    172  1.13     mikel 	    2*sizeof(u_long)*args.gnentries);
    173   1.1   mycroft 	if (error)
    174   1.1   mycroft 		return (error);
    175   1.1   mycroft 
    176  1.22  perseant #ifdef UMAPFS_DIAGNOSTIC
    177  1.11  christos 	printf("umap_mount:gnentries %d\n",args.gnentries);
    178   1.1   mycroft 	for (i = 0; i < args.gnentries; i++)
    179  1.22  perseant 		printf("\tgroup %ld maps to %ld\n",
    180   1.1   mycroft 		    amp->info_gmapdata[i][0],
    181   1.1   mycroft 	 	    amp->info_gmapdata[i][1]);
    182   1.1   mycroft #endif
    183   1.1   mycroft 
    184   1.1   mycroft 
    185   1.1   mycroft 	/*
    186   1.1   mycroft 	 * Save reference.  Each mount also holds
    187   1.1   mycroft 	 * a reference on the root vnode.
    188   1.1   mycroft 	 */
    189   1.1   mycroft 	error = umap_node_create(mp, lowerrootvp, &vp);
    190   1.1   mycroft 	/*
    191   1.1   mycroft 	 * Unlock the node (either the lower or the alias)
    192   1.1   mycroft 	 */
    193  1.18      fvdl 	VOP_UNLOCK(vp, 0);
    194   1.1   mycroft 	/*
    195   1.1   mycroft 	 * Make sure the node alias worked
    196   1.1   mycroft 	 */
    197   1.1   mycroft 	if (error) {
    198   1.1   mycroft 		vrele(lowerrootvp);
    199   1.1   mycroft 		free(amp, M_UFSMNT);	/* XXX */
    200   1.1   mycroft 		return (error);
    201   1.1   mycroft 	}
    202   1.1   mycroft 
    203   1.1   mycroft 	/*
    204   1.1   mycroft 	 * Keep a held reference to the root vnode.
    205   1.1   mycroft 	 * It is vrele'd in umapfs_unmount.
    206   1.1   mycroft 	 */
    207   1.1   mycroft 	umapm_rootvp = vp;
    208   1.1   mycroft 	umapm_rootvp->v_flag |= VROOT;
    209   1.1   mycroft 	amp->umapm_rootvp = umapm_rootvp;
    210   1.1   mycroft 	if (UMAPVPTOLOWERVP(umapm_rootvp)->v_mount->mnt_flag & MNT_LOCAL)
    211   1.1   mycroft 		mp->mnt_flag |= MNT_LOCAL;
    212   1.1   mycroft 	mp->mnt_data = (qaddr_t) amp;
    213  1.18      fvdl 	vfs_getnewfsid(mp, MOUNT_UMAP);
    214   1.1   mycroft 
    215   1.1   mycroft 	(void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
    216  1.19     perry 	memset(mp->mnt_stat.f_mntonname + size, 0, MNAMELEN - size);
    217   1.1   mycroft 	(void) copyinstr(args.target, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,
    218   1.1   mycroft 	    &size);
    219  1.19     perry 	memset(mp->mnt_stat.f_mntfromname + size, 0, MNAMELEN - size);
    220   1.1   mycroft #ifdef UMAPFS_DIAGNOSTIC
    221  1.11  christos 	printf("umapfs_mount: lower %s, alias at %s\n",
    222   1.1   mycroft 		mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
    223   1.1   mycroft #endif
    224   1.1   mycroft 	return (0);
    225   1.1   mycroft }
    226   1.1   mycroft 
    227   1.1   mycroft /*
    228   1.1   mycroft  * VFS start.  Nothing needed here - the start routine
    229   1.1   mycroft  * on the underlying filesystem will have been called
    230   1.1   mycroft  * when that filesystem was mounted.
    231   1.1   mycroft  */
    232   1.1   mycroft int
    233   1.1   mycroft umapfs_start(mp, flags, p)
    234   1.1   mycroft 	struct mount *mp;
    235   1.1   mycroft 	int flags;
    236   1.1   mycroft 	struct proc *p;
    237   1.1   mycroft {
    238   1.1   mycroft 
    239   1.1   mycroft 	return (0);
    240   1.1   mycroft 	/* return (VFS_START(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, flags, p)); */
    241   1.1   mycroft }
    242   1.1   mycroft 
    243   1.1   mycroft /*
    244   1.1   mycroft  * Free reference to umap layer
    245   1.1   mycroft  */
    246   1.1   mycroft int
    247   1.1   mycroft umapfs_unmount(mp, mntflags, p)
    248   1.1   mycroft 	struct mount *mp;
    249   1.1   mycroft 	int mntflags;
    250   1.1   mycroft 	struct proc *p;
    251   1.1   mycroft {
    252   1.1   mycroft 	struct vnode *umapm_rootvp = MOUNTTOUMAPMOUNT(mp)->umapm_rootvp;
    253   1.1   mycroft 	int error;
    254   1.1   mycroft 	int flags = 0;
    255   1.1   mycroft 
    256   1.1   mycroft #ifdef UMAPFS_DIAGNOSTIC
    257  1.15  christos 	printf("umapfs_unmount(mp = %p)\n", mp);
    258   1.1   mycroft #endif
    259   1.1   mycroft 
    260  1.18      fvdl 	if (mntflags & MNT_FORCE)
    261   1.1   mycroft 		flags |= FORCECLOSE;
    262   1.1   mycroft 
    263   1.1   mycroft 	/*
    264   1.1   mycroft 	 * Clear out buffer cache.  I don't think we
    265   1.1   mycroft 	 * ever get anything cached at this level at the
    266   1.1   mycroft 	 * moment, but who knows...
    267   1.1   mycroft 	 */
    268   1.1   mycroft #ifdef notyet
    269   1.1   mycroft 	mntflushbuf(mp, 0);
    270   1.1   mycroft 	if (mntinvalbuf(mp, 1))
    271   1.1   mycroft 		return (EBUSY);
    272   1.1   mycroft #endif
    273   1.1   mycroft 	if (umapm_rootvp->v_usecount > 1)
    274   1.1   mycroft 		return (EBUSY);
    275   1.9  christos 	if ((error = vflush(mp, umapm_rootvp, flags)) != 0)
    276   1.1   mycroft 		return (error);
    277   1.1   mycroft 
    278   1.1   mycroft #ifdef UMAPFS_DIAGNOSTIC
    279   1.1   mycroft 	vprint("alias root of lower", umapm_rootvp);
    280   1.1   mycroft #endif
    281   1.1   mycroft 	/*
    282   1.1   mycroft 	 * Release reference on underlying root vnode
    283   1.1   mycroft 	 */
    284   1.1   mycroft 	vrele(umapm_rootvp);
    285   1.1   mycroft 	/*
    286   1.1   mycroft 	 * And blow it away for future re-use
    287   1.1   mycroft 	 */
    288   1.1   mycroft 	vgone(umapm_rootvp);
    289   1.1   mycroft 	/*
    290   1.1   mycroft 	 * Finally, throw away the umap_mount structure
    291   1.1   mycroft 	 */
    292   1.1   mycroft 	free(mp->mnt_data, M_UFSMNT);	/* XXX */
    293   1.1   mycroft 	mp->mnt_data = 0;
    294   1.1   mycroft 	return (0);
    295   1.1   mycroft }
    296   1.1   mycroft 
    297   1.1   mycroft int
    298   1.1   mycroft umapfs_root(mp, vpp)
    299   1.1   mycroft 	struct mount *mp;
    300   1.1   mycroft 	struct vnode **vpp;
    301   1.1   mycroft {
    302   1.1   mycroft 	struct vnode *vp;
    303   1.1   mycroft 
    304   1.1   mycroft #ifdef UMAPFS_DIAGNOSTIC
    305  1.15  christos 	printf("umapfs_root(mp = %p, vp = %p->%p)\n", mp,
    306  1.10  christos 	    MOUNTTOUMAPMOUNT(mp)->umapm_rootvp,
    307  1.10  christos 	    UMAPVPTOLOWERVP(MOUNTTOUMAPMOUNT(mp)->umapm_rootvp));
    308   1.1   mycroft #endif
    309   1.1   mycroft 
    310   1.1   mycroft 	/*
    311   1.1   mycroft 	 * Return locked reference to root.
    312   1.1   mycroft 	 */
    313   1.1   mycroft 	vp = MOUNTTOUMAPMOUNT(mp)->umapm_rootvp;
    314   1.1   mycroft 	VREF(vp);
    315  1.18      fvdl 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
    316   1.1   mycroft 	*vpp = vp;
    317   1.1   mycroft 	return (0);
    318   1.1   mycroft }
    319   1.1   mycroft 
    320   1.1   mycroft int
    321   1.1   mycroft umapfs_quotactl(mp, cmd, uid, arg, p)
    322   1.1   mycroft 	struct mount *mp;
    323   1.1   mycroft 	int cmd;
    324   1.1   mycroft 	uid_t uid;
    325   1.1   mycroft 	caddr_t arg;
    326   1.1   mycroft 	struct proc *p;
    327   1.1   mycroft {
    328   1.1   mycroft 
    329   1.1   mycroft 	return (VFS_QUOTACTL(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, cmd, uid, arg, p));
    330   1.1   mycroft }
    331   1.1   mycroft 
    332   1.1   mycroft int
    333   1.1   mycroft umapfs_statfs(mp, sbp, p)
    334   1.1   mycroft 	struct mount *mp;
    335   1.1   mycroft 	struct statfs *sbp;
    336   1.1   mycroft 	struct proc *p;
    337   1.1   mycroft {
    338   1.1   mycroft 	int error;
    339   1.1   mycroft 	struct statfs mstat;
    340   1.1   mycroft 
    341   1.1   mycroft #ifdef UMAPFS_DIAGNOSTIC
    342  1.15  christos 	printf("umapfs_statfs(mp = %p, vp = %p->%p)\n", mp,
    343  1.10  christos 	    MOUNTTOUMAPMOUNT(mp)->umapm_rootvp,
    344  1.10  christos 	    UMAPVPTOLOWERVP(MOUNTTOUMAPMOUNT(mp)->umapm_rootvp));
    345   1.1   mycroft #endif
    346   1.1   mycroft 
    347  1.19     perry 	memset(&mstat, 0, sizeof(mstat));
    348   1.1   mycroft 
    349   1.1   mycroft 	error = VFS_STATFS(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, &mstat, p);
    350   1.1   mycroft 	if (error)
    351   1.1   mycroft 		return (error);
    352   1.1   mycroft 
    353   1.1   mycroft 	/* now copy across the "interesting" information and fake the rest */
    354   1.1   mycroft 	sbp->f_type = mstat.f_type;
    355   1.1   mycroft 	sbp->f_flags = mstat.f_flags;
    356   1.1   mycroft 	sbp->f_bsize = mstat.f_bsize;
    357   1.1   mycroft 	sbp->f_iosize = mstat.f_iosize;
    358   1.1   mycroft 	sbp->f_blocks = mstat.f_blocks;
    359   1.1   mycroft 	sbp->f_bfree = mstat.f_bfree;
    360   1.1   mycroft 	sbp->f_bavail = mstat.f_bavail;
    361   1.1   mycroft 	sbp->f_files = mstat.f_files;
    362   1.1   mycroft 	sbp->f_ffree = mstat.f_ffree;
    363   1.1   mycroft 	if (sbp != &mp->mnt_stat) {
    364  1.19     perry 		memcpy(&sbp->f_fsid, &mp->mnt_stat.f_fsid, sizeof(sbp->f_fsid));
    365  1.19     perry 		memcpy(sbp->f_mntonname, mp->mnt_stat.f_mntonname, MNAMELEN);
    366  1.19     perry 		memcpy(sbp->f_mntfromname, mp->mnt_stat.f_mntfromname, MNAMELEN);
    367   1.1   mycroft 	}
    368   1.5   mycroft 	strncpy(sbp->f_fstypename, mp->mnt_op->vfs_name, MFSNAMELEN);
    369   1.1   mycroft 	return (0);
    370   1.1   mycroft }
    371   1.1   mycroft 
    372   1.1   mycroft int
    373   1.1   mycroft umapfs_sync(mp, waitfor, cred, p)
    374   1.1   mycroft 	struct mount *mp;
    375   1.1   mycroft 	int waitfor;
    376   1.1   mycroft 	struct ucred *cred;
    377   1.1   mycroft 	struct proc *p;
    378   1.1   mycroft {
    379   1.1   mycroft 
    380   1.1   mycroft 	/*
    381   1.1   mycroft 	 * XXX - Assumes no data cached at umap layer.
    382   1.1   mycroft 	 */
    383   1.1   mycroft 	return (0);
    384   1.1   mycroft }
    385   1.1   mycroft 
    386   1.1   mycroft int
    387   1.1   mycroft umapfs_vget(mp, ino, vpp)
    388   1.1   mycroft 	struct mount *mp;
    389   1.1   mycroft 	ino_t ino;
    390   1.1   mycroft 	struct vnode **vpp;
    391   1.1   mycroft {
    392   1.1   mycroft 
    393   1.1   mycroft 	return (VFS_VGET(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, ino, vpp));
    394   1.1   mycroft }
    395   1.1   mycroft 
    396   1.1   mycroft int
    397  1.20  wrstuden umapfs_fhtovp(mp, fidp, vpp)
    398   1.1   mycroft 	struct mount *mp;
    399   1.1   mycroft 	struct fid *fidp;
    400  1.20  wrstuden 	struct vnode **vpp;
    401  1.20  wrstuden {
    402  1.20  wrstuden 
    403  1.20  wrstuden 	return (EOPNOTSUPP);
    404  1.20  wrstuden }
    405  1.20  wrstuden 
    406  1.20  wrstuden int
    407  1.20  wrstuden umapfs_checkexp(mp, nam, exflagsp, credanonp)
    408  1.20  wrstuden 	struct mount *mp;
    409   1.1   mycroft 	struct mbuf *nam;
    410   1.1   mycroft 	int *exflagsp;
    411   1.1   mycroft 	struct ucred**credanonp;
    412   1.1   mycroft {
    413   1.1   mycroft 
    414   1.6       cgd 	return (EOPNOTSUPP);
    415   1.1   mycroft }
    416   1.1   mycroft 
    417   1.1   mycroft int
    418   1.1   mycroft umapfs_vptofh(vp, fhp)
    419   1.1   mycroft 	struct vnode *vp;
    420   1.1   mycroft 	struct fid *fhp;
    421   1.1   mycroft {
    422   1.1   mycroft 
    423   1.6       cgd 	return (EOPNOTSUPP);
    424   1.1   mycroft }
    425   1.1   mycroft 
    426  1.18      fvdl int
    427  1.18      fvdl umapfs_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
    428  1.18      fvdl 	int *name;
    429  1.18      fvdl 	u_int namelen;
    430  1.18      fvdl 	void *oldp;
    431  1.18      fvdl 	size_t *oldlenp;
    432  1.18      fvdl 	void *newp;
    433  1.18      fvdl 	size_t newlen;
    434  1.18      fvdl 	struct proc *p;
    435  1.18      fvdl {
    436  1.18      fvdl 	return (EOPNOTSUPP);
    437  1.18      fvdl }
    438  1.18      fvdl 
    439  1.17   thorpej extern struct vnodeopv_desc umapfs_vnodeop_opv_desc;
    440  1.17   thorpej 
    441  1.17   thorpej struct vnodeopv_desc *umapfs_vnodeopv_descs[] = {
    442  1.17   thorpej 	&umapfs_vnodeop_opv_desc,
    443  1.17   thorpej 	NULL,
    444  1.17   thorpej };
    445  1.17   thorpej 
    446  1.16   thorpej struct vfsops umapfs_vfsops = {
    447   1.1   mycroft 	MOUNT_UMAP,
    448   1.1   mycroft 	umapfs_mount,
    449   1.1   mycroft 	umapfs_start,
    450   1.1   mycroft 	umapfs_unmount,
    451   1.1   mycroft 	umapfs_root,
    452   1.1   mycroft 	umapfs_quotactl,
    453   1.1   mycroft 	umapfs_statfs,
    454   1.1   mycroft 	umapfs_sync,
    455   1.1   mycroft 	umapfs_vget,
    456   1.1   mycroft 	umapfs_fhtovp,
    457   1.1   mycroft 	umapfs_vptofh,
    458   1.1   mycroft 	umapfs_init,
    459  1.18      fvdl 	umapfs_sysctl,
    460  1.17   thorpej 	NULL,				/* vfs_mountroot */
    461  1.20  wrstuden 	umapfs_checkexp,
    462  1.17   thorpej 	umapfs_vnodeopv_descs,
    463   1.1   mycroft };
    464