summaryrefslogtreecommitdiffstats
path: root/sys/fs/umapfs
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commit5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/fs/umapfs
parent83e00d4274950d2b531c24692cd123538ffbddb9 (diff)
downloadFreeBSD-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/umapfs')
-rw-r--r--sys/fs/umapfs/umap_subr.c4
-rw-r--r--sys/fs/umapfs/umap_vfsops.c64
-rw-r--r--sys/fs/umapfs/umap_vnops.c12
3 files changed, 40 insertions, 40 deletions
diff --git a/sys/fs/umapfs/umap_subr.c b/sys/fs/umapfs/umap_subr.c
index afcaceb..c61fe7c 100644
--- a/sys/fs/umapfs/umap_subr.c
+++ b/sys/fs/umapfs/umap_subr.c
@@ -141,7 +141,7 @@ umap_node_find(mp, targetvp)
struct mount *mp;
struct vnode *targetvp;
{
- struct proc *p = curproc; /* XXX */
+ struct thread *td = curthread; /* XXX */
struct umap_node_hashhead *hd;
struct umap_node *a;
struct vnode *vp;
@@ -168,7 +168,7 @@ loop:
* stuff, but we don't want to lock
* the lower node.
*/
- if (vget(vp, 0, p)) {
+ if (vget(vp, 0, td)) {
#ifdef DEBUG
printf ("umap_node_find: vget failed.\n");
#endif
diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c
index 116ce16..a22b8df 100644
--- a/sys/fs/umapfs/umap_vfsops.c
+++ b/sys/fs/umapfs/umap_vfsops.c
@@ -62,35 +62,35 @@ static int umapfs_fhtovp __P((struct mount *mp, struct fid *fidp,
static int umapfs_checkexp __P((struct mount *mp, struct sockaddr *nam,
int *extflagsp, struct ucred **credanonp));
static int umapfs_mount __P((struct mount *mp, char *path, caddr_t data,
- struct nameidata *ndp, struct proc *p));
+ struct nameidata *ndp, struct thread *td));
static int umapfs_quotactl __P((struct mount *mp, int cmd, uid_t uid,
- caddr_t arg, struct proc *p));
+ caddr_t arg, struct thread *td));
static int umapfs_root __P((struct mount *mp, struct vnode **vpp));
-static int umapfs_start __P((struct mount *mp, int flags, struct proc *p));
+static int umapfs_start __P((struct mount *mp, int flags, struct thread *td));
static int umapfs_statfs __P((struct mount *mp, struct statfs *sbp,
- struct proc *p));
+ struct thread *td));
static int umapfs_sync __P((struct mount *mp, int waitfor,
- struct ucred *cred, struct proc *p));
+ struct ucred *cred, struct thread *td));
static int umapfs_unmount __P((struct mount *mp, int mntflags,
- struct proc *p));
+ struct thread *td));
static int umapfs_vget __P((struct mount *mp, ino_t ino,
struct vnode **vpp));
static int umapfs_vptofh __P((struct vnode *vp, struct fid *fhp));
static int umapfs_extattrctl __P((struct mount *mp, int cmd,
struct vnode *filename_vp,
int namespace, const char *attrname,
- struct proc *p));
+ struct thread *td));
/*
* Mount umap layer
*/
static int
-umapfs_mount(mp, path, data, ndp, p)
+umapfs_mount(mp, path, data, ndp, td)
struct mount *mp;
char *path;
caddr_t data;
struct nameidata *ndp;
- struct proc *p;
+ struct thread *td;
{
struct umap_args args;
struct vnode *lowerrootvp, *vp;
@@ -105,7 +105,7 @@ umapfs_mount(mp, path, data, ndp, p)
/*
* Only for root
*/
- if ((error = suser(p)) != 0)
+ if ((error = suser_td(td)) != 0)
return (error);
#ifdef DEBUG
@@ -117,7 +117,7 @@ umapfs_mount(mp, path, data, ndp, p)
*/
if (mp->mnt_flag & MNT_UPDATE) {
return (EOPNOTSUPP);
- /* return (VFS_MOUNT(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, path, data, ndp, p));*/
+ /* return (VFS_MOUNT(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, path, data, ndp, td));*/
}
/*
@@ -131,7 +131,7 @@ umapfs_mount(mp, path, data, ndp, p)
* Find lower node
*/
NDINIT(ndp, LOOKUP, FOLLOW|WANTPARENT|LOCKLEAF,
- UIO_USERSPACE, args.target, p);
+ UIO_USERSPACE, args.target, td);
error = namei(ndp);
if (error)
return (error);
@@ -209,7 +209,7 @@ umapfs_mount(mp, path, data, ndp, p)
/*
* Unlock the node (either the lower or the alias)
*/
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, 0, td);
/*
* Make sure the node alias worked
*/
@@ -234,7 +234,7 @@ umapfs_mount(mp, path, data, ndp, p)
(void) copyinstr(args.target, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,
&size);
bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
- (void)umapfs_statfs(mp, &mp->mnt_stat, p);
+ (void)umapfs_statfs(mp, &mp->mnt_stat, td);
#ifdef DEBUG
printf("umapfs_mount: lower %s, alias at %s\n",
mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
@@ -248,23 +248,23 @@ umapfs_mount(mp, path, data, ndp, p)
* when that filesystem was mounted.
*/
static int
-umapfs_start(mp, flags, p)
+umapfs_start(mp, flags, td)
struct mount *mp;
int flags;
- struct proc *p;
+ struct thread *td;
{
return (0);
- /* return (VFS_START(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, flags, p)); */
+ /* return (VFS_START(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, flags, td)); */
}
/*
* Free reference to umap layer
*/
static int
-umapfs_unmount(mp, mntflags, p)
+umapfs_unmount(mp, mntflags, td)
struct mount *mp;
int mntflags;
- struct proc *p;
+ struct thread *td;
{
int error;
int flags = 0;
@@ -304,7 +304,7 @@ umapfs_root(mp, vpp)
struct mount *mp;
struct vnode **vpp;
{
- struct proc *p = curproc; /* XXX */
+ struct thread *td = curthread; /* XXX */
struct vnode *vp;
#ifdef DEBUG
@@ -318,27 +318,27 @@ umapfs_root(mp, vpp)
*/
vp = MOUNTTOUMAPMOUNT(mp)->umapm_rootvp;
VREF(vp);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
*vpp = vp;
return (0);
}
static int
-umapfs_quotactl(mp, cmd, uid, arg, p)
+umapfs_quotactl(mp, cmd, uid, arg, td)
struct mount *mp;
int cmd;
uid_t uid;
caddr_t arg;
- struct proc *p;
+ struct thread *td;
{
- return (VFS_QUOTACTL(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, cmd, uid, arg, p));
+ return (VFS_QUOTACTL(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, cmd, uid, arg, td));
}
static int
-umapfs_statfs(mp, sbp, p)
+umapfs_statfs(mp, sbp, td)
struct mount *mp;
struct statfs *sbp;
- struct proc *p;
+ struct thread *td;
{
int error;
struct statfs mstat;
@@ -351,7 +351,7 @@ umapfs_statfs(mp, sbp, p)
bzero(&mstat, sizeof(mstat));
- error = VFS_STATFS(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, &mstat, p);
+ error = VFS_STATFS(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, &mstat, td);
if (error)
return (error);
@@ -374,11 +374,11 @@ umapfs_statfs(mp, sbp, p)
}
static int
-umapfs_sync(mp, waitfor, cred, p)
+umapfs_sync(mp, waitfor, cred, td)
struct mount *mp;
int waitfor;
struct ucred *cred;
- struct proc *p;
+ struct thread *td;
{
/*
* XXX - Assumes no data cached at umap layer.
@@ -427,16 +427,16 @@ umapfs_vptofh(vp, fhp)
}
static int
-umapfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, p)
+umapfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, td)
struct mount *mp;
int cmd;
struct vnode *filename_vp;
int namespace;
const char *attrname;
- struct proc *p;
+ struct thread *td;
{
return (VFS_EXTATTRCTL(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, cmd,
- filename_vp, namespace, attrname, p));
+ filename_vp, namespace, attrname, td));
}
diff --git a/sys/fs/umapfs/umap_vnops.c b/sys/fs/umapfs/umap_vnops.c
index b73ff2c..77a8a14 100644
--- a/sys/fs/umapfs/umap_vnops.c
+++ b/sys/fs/umapfs/umap_vnops.c
@@ -283,7 +283,7 @@ umap_getattr(ap)
struct vnode *a_vp;
struct vattr *a_vap;
struct ucred *a_cred;
- struct proc *a_p;
+ struct thread *a_td;
} */ *ap;
{
short uid, gid;
@@ -359,7 +359,7 @@ umap_lock(ap)
struct vop_lock_args /* {
struct vnode *a_vp;
int a_flags;
- struct proc *a_p;
+ struct thread *a_td;
} */ *ap;
{
@@ -380,7 +380,7 @@ umap_unlock(ap)
struct vop_unlock_args /* {
struct vnode *a_vp;
int a_flags;
- struct proc *a_p;
+ struct thread *a_td;
} */ *ap;
{
vop_nounlock(ap);
@@ -392,7 +392,7 @@ static int
umap_inactive(ap)
struct vop_inactive_args /* {
struct vnode *a_vp;
- struct proc *a_p;
+ struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;
@@ -405,8 +405,8 @@ umap_inactive(ap)
* cache and reusable.
*
*/
- VOP_INACTIVE(lowervp, ap->a_p);
- VOP_UNLOCK(ap->a_vp, 0, ap->a_p);
+ VOP_INACTIVE(lowervp, ap->a_td);
+ VOP_UNLOCK(ap->a_vp, 0, ap->a_td);
return (0);
}
OpenPOWER on IntegriCloud