summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/union
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>1999-09-07 22:42:38 +0000
committeralfred <alfred@FreeBSD.org>1999-09-07 22:42:38 +0000
commite16a3900a7835b58a16e19a58511db912f1081f8 (patch)
treef6801d0b7edc902d94f170cf5d4a357c90e1fdb6 /sys/miscfs/union
parent16f9b4552c757be79df4ea6fa44b8be88902894b (diff)
downloadFreeBSD-src-e16a3900a7835b58a16e19a58511db912f1081f8.zip
FreeBSD-src-e16a3900a7835b58a16e19a58511db912f1081f8.tar.gz
All unimplemented VFS ops now have entries in kern/vfs_default.c that return
reasonable defaults. This avoids confusing and ugly casting to eopnotsupp or making dummy functions. Bogus casting of filesystem sysctls to eopnotsupp() have been removed. This should make *_vfsops.c more readable and reduce bloat. Reviewed by: msmith, eivind Approved by: phk Tested by: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
Diffstat (limited to 'sys/miscfs/union')
-rw-r--r--sys/miscfs/union/union_vfsops.c55
1 files changed, 6 insertions, 49 deletions
diff --git a/sys/miscfs/union/union_vfsops.c b/sys/miscfs/union/union_vfsops.c
index 888ad30..def8416 100644
--- a/sys/miscfs/union/union_vfsops.c
+++ b/sys/miscfs/union/union_vfsops.c
@@ -56,25 +56,13 @@
static MALLOC_DEFINE(M_UNIONFSMNT, "UNION mount", "UNION mount structure");
extern int union_init __P((struct vfsconf *));
-
-extern int union_fhtovp __P((struct mount *mp, struct fid *fidp,
- struct mbuf *nam, struct vnode **vpp,
- int *exflagsp, struct ucred **credanonp));
static int union_mount __P((struct mount *mp, char *path, caddr_t data,
struct nameidata *ndp, struct proc *p));
-extern int union_quotactl __P((struct mount *mp, int cmd, uid_t uid,
- caddr_t arg, struct proc *p));
static int union_root __P((struct mount *mp, struct vnode **vpp));
-static int union_start __P((struct mount *mp, int flags, struct proc *p));
static int union_statfs __P((struct mount *mp, struct statfs *sbp,
struct proc *p));
-extern int union_sync __P((struct mount *mp, int waitfor,
- struct ucred *cred, struct proc *p));
static int union_unmount __P((struct mount *mp, int mntflags,
struct proc *p));
-extern int union_vget __P((struct mount *mp, ino_t ino,
- struct vnode **vpp));
-extern int union_vptofh __P((struct vnode *vp, struct fid *fhp));
/*
* Mount union filesystem
@@ -289,21 +277,6 @@ bad:
}
/*
- * VFS start. Nothing needed here - the start routine
- * on the underlying filesystem(s) will have been called
- * when that filesystem was mounted.
- */
-static int
-union_start(mp, flags, p)
- struct mount *mp;
- int flags;
- struct proc *p;
-{
-
- return (0);
-}
-
-/*
* Free reference to union layer
*/
static int
@@ -521,33 +494,17 @@ union_statfs(mp, sbp, p)
return (0);
}
-/*
- * XXX - Assumes no data cached at union layer.
- */
-#define union_sync ((int (*) __P((struct mount *, int, struct ucred *, \
- struct proc *)))nullop)
-
-#define union_fhtovp ((int (*) __P((struct mount *, struct fid *, \
- struct sockaddr *, struct vnode **, int *, struct ucred **)))eopnotsupp)
-#define union_quotactl ((int (*) __P((struct mount *, int, uid_t, caddr_t, \
- struct proc *)))eopnotsupp)
-#define union_sysctl ((int (*) __P((int *, u_int, void *, size_t *, void *, \
- size_t, struct proc *)))eopnotsupp)
-#define union_vget ((int (*) __P((struct mount *, ino_t, struct vnode **))) \
- eopnotsupp)
-#define union_vptofh ((int (*) __P((struct vnode *, struct fid *)))eopnotsupp)
-
static struct vfsops union_vfsops = {
union_mount,
- union_start,
+ vfs_stdstart,
union_unmount,
union_root,
- union_quotactl,
+ vfs_stdquotactl,
union_statfs,
- union_sync,
- union_vget,
- union_fhtovp,
- union_vptofh,
+ vfs_stdsync, /* XXX assumes no cached data on union level */
+ vfs_stdvget,
+ vfs_stdfhtovp,
+ vfs_stdvptofh,
union_init,
};
OpenPOWER on IntegriCloud