summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/common/vfs_syscalls_43.c30
-rw-r--r--sys/compat/linux/linux_getcwd.c24
-rw-r--r--sys/compat/netbsd/netbsd_getcwd.c24
-rw-r--r--sys/compat/netbsd/netbsd_getdents.c56
-rw-r--r--sys/conf/GENERIC6
-rw-r--r--sys/conf/files13
-rw-r--r--sys/kern/tty_pty.c4
-rw-r--r--sys/kern/vfs_lookup.c17
-rw-r--r--sys/kern/vfs_subr.c6
-rw-r--r--sys/kern/vfs_syscalls.c40
-rw-r--r--sys/sys/mount.h6
-rw-r--r--sys/sys/vnode.h9
12 files changed, 22 insertions, 213 deletions
diff --git a/sys/compat/common/vfs_syscalls_43.c b/sys/compat/common/vfs_syscalls_43.c
index 86b3edfd681..e95f45114de 100644
--- a/sys/compat/common/vfs_syscalls_43.c
+++ b/sys/compat/common/vfs_syscalls_43.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls_43.c,v 1.25 2004/07/14 18:57:57 millert Exp $ */
+/* $OpenBSD: vfs_syscalls_43.c,v 1.26 2005/05/26 00:33:45 pedro Exp $ */
/* $NetBSD: vfs_syscalls_43.c,v 1.4 1996/03/14 19:31:52 christos Exp $ */
/*
@@ -66,17 +66,6 @@
static void cvtstat(struct stat *, struct stat43 *);
/*
- * Redirection info so we don't have to include the union fs routines in
- * the kernel directly. This way, we can build unionfs as an LKM. The
- * pointer gets replaced later, when we modload the LKM, or when the
- * compiled-in unionfs code gets initialized. Initial, stub routine
- * value is compiled in from kern/vfs_syscalls.c
- */
-
-extern int (*union_check_p)(struct proc *, struct vnode **,
- struct file *, struct uio, int *);
-
-/*
* Convert from a new to an old stat structure.
*/
static void
@@ -366,7 +355,6 @@ compat_43_sys_getdirentries(p, v, retval)
goto bad;
}
vp = (struct vnode *)fp->f_data;
-unionread:
if (vp->v_type != VDIR) {
error = EINVAL;
goto bad;
@@ -441,24 +429,8 @@ unionread:
VOP_UNLOCK(vp, 0, p);
if (error)
goto bad;
- if ((SCARG(uap, count) == auio.uio_resid) &&
- union_check_p &&
- (union_check_p(p, &vp, fp, auio, &error) != 0))
- goto unionread;
if (error)
goto bad;
-
- if ((SCARG(uap, count) == auio.uio_resid) &&
- (vp->v_flag & VROOT) &&
- (vp->v_mount->mnt_flag & MNT_UNION)) {
- struct vnode *tvp = vp;
- vp = vp->v_mount->mnt_vnodecovered;
- VREF(vp);
- fp->f_data = (caddr_t) vp;
- fp->f_offset = 0;
- vrele(tvp);
- goto unionread;
- }
error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep),
sizeof(long));
*retval = SCARG(uap, count) - auio.uio_resid;
diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c
index 5fe168f12f0..8038ca2c9cf 100644
--- a/sys/compat/linux/linux_getcwd.c
+++ b/sys/compat/linux/linux_getcwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_getcwd.c,v 1.5 2004/08/03 12:10:47 todd Exp $ */
+/* $OpenBSD: linux_getcwd.c,v 1.6 2005/05/26 00:33:45 pedro Exp $ */
/* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */
/*-
@@ -268,27 +268,7 @@ unionread:
}
}
} while (!eofflag);
-#if 0
- /*
- * Deal with mount -o union, which unions only the
- * root directory of the mount.
- */
- if ((uvp->v_flag & VROOT) &&
- (uvp->v_mount->mnt_flag & MNT_UNION)) {
- struct vnode *tvp = uvp;
- uvp = uvp->v_mount->mnt_vnodecovered;
- vput(tvp);
- VREF(uvp);
- *uvpp = uvp;
- error = vn_lock(uvp, LK_EXCLUSIVE | LK_RETRY);
- if (error != 0) {
- vrele(uvp);
- *uvpp = uvp = NULL;
- goto out;
- }
- goto unionread;
- }
-#endif
+
error = ENOENT;
out:
diff --git a/sys/compat/netbsd/netbsd_getcwd.c b/sys/compat/netbsd/netbsd_getcwd.c
index 5c5a00ebde6..330e7d405b5 100644
--- a/sys/compat/netbsd/netbsd_getcwd.c
+++ b/sys/compat/netbsd/netbsd_getcwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netbsd_getcwd.c,v 1.7 2004/08/03 12:10:47 todd Exp $ */
+/* $OpenBSD: netbsd_getcwd.c,v 1.8 2005/05/26 00:33:45 pedro Exp $ */
/* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */
/*-
@@ -262,27 +262,7 @@ unionread:
}
}
} while (!eofflag);
-#if 0
- /*
- * Deal with mount -o union, which unions only the
- * root directory of the mount.
- */
- if ((uvp->v_flag & VROOT) &&
- (uvp->v_mount->mnt_flag & MNT_UNION)) {
- struct vnode *tvp = uvp;
- uvp = uvp->v_mount->mnt_vnodecovered;
- vput(tvp);
- VREF(uvp);
- *uvpp = uvp;
- error = vn_lock(uvp, LK_EXCLUSIVE | LK_RETRY);
- if (error != 0) {
- vrele(uvp);
- *uvpp = uvp = NULL;
- goto out;
- }
- goto unionread;
- }
-#endif
+
error = ENOENT;
out:
diff --git a/sys/compat/netbsd/netbsd_getdents.c b/sys/compat/netbsd/netbsd_getdents.c
index 53f2d7c5efd..dd621bd4bd4 100644
--- a/sys/compat/netbsd/netbsd_getdents.c
+++ b/sys/compat/netbsd/netbsd_getdents.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netbsd_getdents.c,v 1.8 2003/06/02 23:28:00 millert Exp $ */
+/* $OpenBSD: netbsd_getdents.c,v 1.9 2005/05/26 00:33:45 pedro Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -66,7 +66,6 @@ netbsd_vn_readdir(fp, buf, segflg, count, done, p, cookies, ncookies)
struct uio auio;
int error, eofflag;
-unionread:
if (vp->v_type != VDIR)
return (EINVAL);
aiov.iov_base = buf;
@@ -85,59 +84,6 @@ unionread:
VOP_UNLOCK(vp, 0, p);
if (error)
return (error);
-
-#ifdef UNION
-{
- extern int (**union_vnodeop_p)(void *);
- extern struct vnode *union_dircache(struct vnode *);
-
- if (count == auio.uio_resid && (vp->v_op == union_vnodeop_p)) {
- struct vnode *lvp;
-
- lvp = union_dircache(vp);
- if (lvp != NULLVP) {
- struct vattr va;
-
- /*
- * If the directory is opaque,
- * then don't show lower entries
- */
- error = VOP_GETATTR(vp, &va, fp->f_cred, p);
- if (va.va_flags & OPAQUE) {
- vput(lvp);
- lvp = NULL;
- }
- }
-
- if (lvp != NULLVP) {
- error = VOP_OPEN(lvp, FREAD, fp->f_cred, p);
- if (error) {
- vput(lvp);
- return (error);
- }
- VOP_UNLOCK(lvp, 0, p);
- fp->f_data = (caddr_t) lvp;
- fp->f_offset = 0;
- error = vn_close(vp, FREAD, fp->f_cred, p);
- if (error)
- return (error);
- vp = lvp;
- goto unionread;
- }
- }
-}
-#endif /* UNION */
-
- if (count == auio.uio_resid && (vp->v_flag & VROOT) &&
- (vp->v_mount->mnt_flag & MNT_UNION)) {
- struct vnode *tvp = vp;
- vp = vp->v_mount->mnt_vnodecovered;
- VREF(vp);
- fp->f_data = (caddr_t) vp;
- fp->f_offset = 0;
- vrele(tvp);
- goto unionread;
- }
*done = count - auio.uio_resid;
return error;
}
diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC
index 3685dc085e8..1e5cafbb56f 100644
--- a/sys/conf/GENERIC
+++ b/sys/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.116 2005/05/24 02:45:17 reyk Exp $
+# $OpenBSD: GENERIC,v 1.117 2005/05/26 00:33:45 pedro Exp $
#
# Machine-independent option; used by all architectures for their
# GENERIC kernel
@@ -57,10 +57,6 @@ option FIFO # FIFOs; RECOMMENDED
#option KERNFS # /kern
option PORTAL # dynamically created filesystem objects
option PROCFS # /proc
-# layer filesystems
-#option NULLFS # loopback file system
-#option UMAPFS # NULLFS + uid and gid remapping
-#option UNION # union file system
option INET # IP + ICMP + TCP + UDP
option ALTQ # ALTQ base
diff --git a/sys/conf/files b/sys/conf/files
index 837718eaf15..0b540f09041 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1,4 +1,4 @@
-# $OpenBSD: files,v 1.338 2005/05/24 02:45:17 reyk Exp $
+# $OpenBSD: files,v 1.339 2005/05/26 00:33:45 pedro Exp $
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@@ -658,16 +658,11 @@ file kern/vfs_syscalls.c
file kern/vfs_vnops.c
file kern/vnode_if.c
file miscfs/deadfs/dead_vnops.c
-file miscfs/genfs/layer_subr.c nullfs | umapfs
-file miscfs/genfs/layer_vfsops.c nullfs | umapfs
-file miscfs/genfs/layer_vnops.c nullfs | umapfs
file miscfs/fdesc/fdesc_vfsops.c fdesc
file miscfs/fdesc/fdesc_vnops.c fdesc
file miscfs/fifofs/fifo_vnops.c fifo
file miscfs/kernfs/kernfs_vfsops.c kernfs
file miscfs/kernfs/kernfs_vnops.c kernfs
-file miscfs/nullfs/null_vfsops.c nullfs
-file miscfs/nullfs/null_vnops.c nullfs
file miscfs/portal/portal_vfsops.c portal
file miscfs/portal/portal_vnops.c portal
file miscfs/procfs/procfs_cmdline.c procfs
@@ -680,12 +675,6 @@ file miscfs/procfs/procfs_subr.c procfs
file miscfs/procfs/procfs_vfsops.c procfs
file miscfs/procfs/procfs_vnops.c procfs
file miscfs/specfs/spec_vnops.c
-file miscfs/umapfs/umap_subr.c umapfs
-file miscfs/umapfs/umap_vfsops.c umapfs
-file miscfs/umapfs/umap_vnops.c umapfs
-file miscfs/union/union_subr.c union
-file miscfs/union/union_vfsops.c union
-file miscfs/union/union_vnops.c union
file msdosfs/msdosfs_conv.c msdosfs
file msdosfs/msdosfs_denode.c msdosfs
file msdosfs/msdosfs_fat.c msdosfs
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 3a83bcb4fc3..f39aafb321c 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_pty.c,v 1.28 2005/01/28 15:43:24 millert Exp $ */
+/* $OpenBSD: tty_pty.c,v 1.29 2005/05/26 00:33:45 pedro Exp $ */
/* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */
/*
@@ -1210,7 +1210,7 @@ retry:
}
VOP_UNLOCK(snd.ni_vp, 0, p);
if (snd.ni_vp->v_usecount > 1 ||
- (snd.ni_vp->v_flag & (VALIASED | VLAYER)))
+ (snd.ni_vp->v_flag & (VALIASED)))
VOP_REVOKE(snd.ni_vp, REVOKEALL);
/*
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 72e07f8f400..8a97300592b 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_lookup.c,v 1.28 2004/07/11 16:42:45 pedro Exp $ */
+/* $OpenBSD: vfs_lookup.c,v 1.29 2005/05/26 00:33:45 pedro Exp $ */
/* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */
/*
@@ -446,7 +446,6 @@ dirloop:
/*
* We now have a segment name to search for, and a directory to search.
*/
-unionlookup:
ndp->ni_dvp = dp;
ndp->ni_vp = NULL;
cnp->cn_flags &= ~PDIRUNLOCK;
@@ -459,20 +458,6 @@ unionlookup:
#ifdef NAMEI_DIAGNOSTIC
printf("not found\n");
#endif
- if ((error == ENOENT) &&
- (dp->v_flag & VROOT) &&
- (dp->v_mount->mnt_flag & MNT_UNION)) {
- tdp = dp;
- dp = dp->v_mount->mnt_vnodecovered;
- if (cnp->cn_flags & PDIRUNLOCK)
- vrele(tdp);
- else
- vput(tdp);
- VREF(dp);
- vn_lock(dp, LK_EXCLUSIVE | LK_RETRY, p);
- goto unionlookup;
- }
-
if (error != EJUSTRETURN)
goto bad;
/*
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 0211ad4b60c..f2b525efde0 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.113 2005/05/24 05:34:54 pedro Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.114 2005/05/26 00:33:45 pedro Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -409,8 +409,6 @@ getnewvnode(tag, mp, vops, vpp)
for (vp = TAILQ_FIRST(listhd); vp != NULLVP;
vp = TAILQ_NEXT(vp, v_freelist)) {
if (simple_lock_try(&vp->v_interlock)) {
- if ((vp->v_flag & VLAYER) == 0)
- break;
if (VOP_ISLOCKED(vp) == 0)
break;
else
@@ -459,7 +457,6 @@ getnewvnode(tag, mp, vops, vpp)
vp->v_type = VNON;
cache_purge(vp);
vp->v_vnlock = NULL;
- lockinit(&vp->v_lock, PVFS, "v_lock", 0, 0);
vp->v_tag = tag;
vp->v_op = vops;
insmntque(vp, mp);
@@ -638,7 +635,6 @@ loop:
simple_lock(&vp->v_interlock);
vclean(vp, 0, p);
vp->v_vnlock = NULL;
- lockinit(&vp->v_lock, PVFS, "v_lock", 0, 0);
vp->v_op = nvp->v_op;
vp->v_tag = nvp->v_tag;
nvp->v_type = VNON;
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 694a2f9a549..ff1f5f27b51 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.120 2005/05/24 05:34:54 pedro Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.121 2005/05/26 00:33:45 pedro Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -66,17 +66,6 @@ static int change_dir(struct nameidata *, struct proc *);
void checkdirs(struct vnode *);
/*
- * Redirection info so we don't have to include the union fs routines in
- * the kernel directly. This way, we can build unionfs as an LKM. The
- * pointer gets filled in later, when we modload the LKM, or when the
- * compiled-in unionfs code gets initialized. For now, we just set
- * it to a stub routine.
- */
-
-int (*union_check_p)(struct proc *, struct vnode **,
- struct file *, struct uio, int *) = NULL;
-
-/*
* Virtual File System System Calls
*/
@@ -270,11 +259,11 @@ update:
else if (mp->mnt_flag & MNT_RDONLY)
mp->mnt_flag |= MNT_WANTRDWR;
mp->mnt_flag &=~ (MNT_NOSUID | MNT_NOEXEC | MNT_NODEV |
- MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_SOFTDEP |
- MNT_NOATIME | MNT_FORCE);
+ MNT_SYNCHRONOUS | MNT_ASYNC | MNT_SOFTDEP | MNT_NOATIME |
+ MNT_FORCE);
mp->mnt_flag |= SCARG(uap, flags) & (MNT_NOSUID | MNT_NOEXEC |
- MNT_NODEV | MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC |
- MNT_SOFTDEP | MNT_NOATIME | MNT_FORCE);
+ MNT_NODEV | MNT_SYNCHRONOUS | MNT_ASYNC | MNT_SOFTDEP |
+ MNT_NOATIME | MNT_FORCE);
/*
* Mount the filesystem.
*/
@@ -2534,7 +2523,6 @@ sys_getdirentries(p, v, retval)
goto bad;
}
vp = (struct vnode *)fp->f_data;
-unionread:
if (vp->v_type != VDIR) {
error = EINVAL;
goto bad;
@@ -2554,24 +2542,8 @@ unionread:
VOP_UNLOCK(vp, 0, p);
if (error)
goto bad;
- if ((SCARG(uap, count) == auio.uio_resid) &&
- union_check_p &&
- (union_check_p(p, &vp, fp, auio, &error) != 0))
- goto unionread;
if (error)
goto bad;
-
- if ((SCARG(uap, count) == auio.uio_resid) &&
- (vp->v_flag & VROOT) &&
- (vp->v_mount->mnt_flag & MNT_UNION)) {
- struct vnode *tvp = vp;
- vp = vp->v_mount->mnt_vnodecovered;
- VREF(vp);
- fp->f_data = vp;
- fp->f_offset = 0;
- vrele(tvp);
- goto unionread;
- }
error = copyout(&loff, SCARG(uap, basep),
sizeof(long));
*retval = SCARG(uap, count) - auio.uio_resid;
@@ -2628,7 +2600,7 @@ sys_revoke(p, v, retval)
if (p->p_ucred->cr_uid != vattr.va_uid &&
(error = suser(p, 0)))
goto out;
- if (vp->v_usecount > 1 || (vp->v_flag & (VALIASED | VLAYER)))
+ if (vp->v_usecount > 1 || (vp->v_flag & (VALIASED)))
VOP_REVOKE(vp, REVOKEALL);
out:
vrele(vp);
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index c80ebf69d7f..581d341aa92 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount.h,v 1.60 2005/05/24 05:34:54 pedro Exp $ */
+/* $OpenBSD: mount.h,v 1.61 2005/05/26 00:33:45 pedro Exp $ */
/* $NetBSD: mount.h,v 1.48 1996/02/18 11:55:47 fvdl Exp $ */
/*
@@ -348,13 +348,10 @@ struct ostatfs {
#define MOUNT_LOFS "lofs" /* Loopback filesystem */
#define MOUNT_FDESC "fdesc" /* File Descriptor Filesystem */
#define MOUNT_PORTAL "portal" /* Portal Filesystem */
-#define MOUNT_NULL "null" /* Minimal Filesystem Layer */
-#define MOUNT_UMAP "umap" /* User/Group Identifier Remapping Filesystem */
#define MOUNT_KERNFS "kernfs" /* Kernel Information Filesystem */
#define MOUNT_PROCFS "procfs" /* /proc Filesystem */
#define MOUNT_AFS "afs" /* Andrew Filesystem */
#define MOUNT_CD9660 "cd9660" /* ISO9660 (aka CDROM) Filesystem */
-#define MOUNT_UNION "union" /* Union (translucent) Filesystem */
#define MOUNT_ADOSFS "adosfs" /* AmigaDOS Filesystem */
#define MOUNT_EXT2FS "ext2fs" /* Second Extended Filesystem */
#define MOUNT_NCPFS "ncpfs" /* NetWare Network File System */
@@ -393,7 +390,6 @@ struct mount {
#define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */
#define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */
#define MNT_NODEV 0x00000010 /* don't interpret special files */
-#define MNT_UNION 0x00000020 /* union with underlying filesystem */
#define MNT_ASYNC 0x00000040 /* file system written asynchronously */
/*
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 0befeccfb6b..252aca05302 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnode.h,v 1.60 2005/03/29 17:24:52 pedro Exp $ */
+/* $OpenBSD: vnode.h,v 1.61 2005/05/26 00:33:45 pedro Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
@@ -64,9 +64,8 @@ enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD };
*/
enum vtagtype {
VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_MSDOSFS, VT_LFS, VT_LOFS, VT_FDESC,
- VT_PORTAL, VT_NULL, VT_UMAP, VT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS,
- VT_UNION, VT_ADOSFS, VT_EXT2FS, VT_NCPFS, VT_VFS, VT_XFS, VT_NTFS,
- VT_UDF
+ VT_PORTAL, VT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS, VT_ADOSFS, VT_EXT2FS,
+ VT_NCPFS, VT_VFS, VT_XFS, VT_NTFS, VT_UDF
};
/*
@@ -110,7 +109,6 @@ struct vnode {
} v_un;
struct simplelock v_interlock; /* lock on usecount and flag */
- struct lock v_lock;
struct lock *v_vnlock; /* used for non-locking fs's */
enum vtagtype v_tag; /* type of underlying data */
void *v_data; /* private data for fs */
@@ -134,7 +132,6 @@ struct vnode {
#define VXLOCK 0x0100 /* vnode is locked to change underlying type */
#define VXWANT 0x0200 /* process is waiting for vnode */
#define VALIASED 0x0800 /* vnode has an alias */
-#define VLAYER 0x2000 /* vnode is on a layer file system */
#define VLOCKSWORK 0x4000 /* FS supports locking discipline */
/*