diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/fs/unionfs/union_vfsops.c | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz |
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/fs/unionfs/union_vfsops.c')
-rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index aa4986c..7f616cb 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -59,23 +59,23 @@ static MALLOC_DEFINE(M_UNIONFSMNT, "UNION mount", "UNION mount structure"); extern int union_init __P((struct vfsconf *)); static int union_mount __P((struct mount *mp, char *path, caddr_t data, - struct nameidata *ndp, struct proc *p)); + struct nameidata *ndp, struct thread *td)); static int union_root __P((struct mount *mp, struct vnode **vpp)); static int union_statfs __P((struct mount *mp, struct statfs *sbp, - struct proc *p)); + struct thread *td)); static int union_unmount __P((struct mount *mp, int mntflags, - struct proc *p)); + struct thread *td)); /* * Mount union filesystem */ static int -union_mount(mp, path, data, ndp, p) +union_mount(mp, path, data, ndp, td) struct mount *mp; char *path; caddr_t data; struct nameidata *ndp; - struct proc *p; + struct thread *td; { int error = 0; struct union_args args; @@ -127,7 +127,7 @@ union_mount(mp, path, data, ndp, p) * Unlock lower node to avoid deadlock. */ if (lowerrootvp->v_op == union_vnodeop_p) - VOP_UNLOCK(lowerrootvp, 0, p); + VOP_UNLOCK(lowerrootvp, 0, td); #endif /* @@ -135,13 +135,13 @@ union_mount(mp, path, data, ndp, p) * upperrootvp will be turned referenced but not locked. */ NDINIT(ndp, LOOKUP, FOLLOW|WANTPARENT, - UIO_USERSPACE, args.target, p); + UIO_USERSPACE, args.target, td); error = namei(ndp); #if 0 if (lowerrootvp->v_op == union_vnodeop_p) - vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY, p); + vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY, td); #endif if (error) goto bad; @@ -223,9 +223,9 @@ union_mount(mp, path, data, ndp, p) goto bad; } - um->um_cred = p->p_ucred; + um->um_cred = td->td_proc->p_ucred; crhold(um->um_cred); - um->um_cmode = UN_DIRMODE &~ p->p_fd->fd_cmask; + um->um_cmode = UN_DIRMODE &~ td->td_proc->p_fd->fd_cmask; /* * Depending on what you think the MNT_LOCAL flag might mean, @@ -275,7 +275,7 @@ union_mount(mp, path, data, ndp, p) (void) copyinstr(args.target, cp, len - 1, &size); bzero(cp + size, len - size); - (void)union_statfs(mp, &mp->mnt_stat, p); + (void)union_statfs(mp, &mp->mnt_stat, td); UDEBUG(("union_mount: from %s, on %s\n", mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname)); @@ -303,10 +303,10 @@ bad: * Free reference to union layer */ static int -union_unmount(mp, mntflags, p) +union_unmount(mp, mntflags, td) struct mount *mp; int mntflags; - struct proc *p; + struct thread *td; { struct union_mount *um = MOUNTTOUNIONMOUNT(mp); int error; @@ -396,10 +396,10 @@ union_root(mp, vpp) } static int -union_statfs(mp, sbp, p) +union_statfs(mp, sbp, td) struct mount *mp; struct statfs *sbp; - struct proc *p; + struct thread *td; { int error; struct union_mount *um = MOUNTTOUNIONMOUNT(mp); @@ -412,7 +412,7 @@ union_statfs(mp, sbp, p) bzero(&mstat, sizeof(mstat)); if (um->um_lowervp) { - error = VFS_STATFS(um->um_lowervp->v_mount, &mstat, p); + error = VFS_STATFS(um->um_lowervp->v_mount, &mstat, td); if (error) return (error); } @@ -431,7 +431,7 @@ union_statfs(mp, sbp, p) sbp->f_files = mstat.f_files; sbp->f_ffree = mstat.f_ffree; - error = VFS_STATFS(um->um_uppervp->v_mount, &mstat, p); + error = VFS_STATFS(um->um_uppervp->v_mount, &mstat, td); if (error) return (error); |