summaryrefslogtreecommitdiffstats
path: root/sys/isofs/cd9660/cd9660_vfsops.c
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/isofs/cd9660/cd9660_vfsops.c
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/isofs/cd9660/cd9660_vfsops.c')
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index 0b42933..73a5bce 100644
--- a/sys/isofs/cd9660/cd9660_vfsops.c
+++ b/sys/isofs/cd9660/cd9660_vfsops.c
@@ -65,10 +65,10 @@ MALLOC_DEFINE(M_ISOFSMNT, "ISOFS mount", "ISOFS mount structure");
MALLOC_DEFINE(M_ISOFSNODE, "ISOFS node", "ISOFS vnode private part");
static int cd9660_mount __P((struct mount *,
- char *, caddr_t, struct nameidata *, struct proc *));
-static int cd9660_unmount __P((struct mount *, int, struct proc *));
+ char *, caddr_t, struct nameidata *, struct thread *));
+static int cd9660_unmount __P((struct mount *, int, struct thread *));
static int cd9660_root __P((struct mount *, struct vnode **));
-static int cd9660_statfs __P((struct mount *, struct statfs *, struct proc *));
+static int cd9660_statfs __P((struct mount *, struct statfs *, struct thread *));
static int cd9660_vget __P((struct mount *, ino_t, struct vnode **));
static int cd9660_fhtovp __P((struct mount *, struct fid *, struct vnode **));
static int cd9660_vptofh __P((struct vnode *, struct fid *));
@@ -97,9 +97,9 @@ MODULE_VERSION(cd9660, 1);
* Called by vfs_mountroot when iso is going to be mounted as root.
*/
-static int iso_get_ssector __P((dev_t dev, struct proc *p));
+static int iso_get_ssector __P((dev_t dev, struct thread *td));
static int iso_mountfs __P((struct vnode *devvp, struct mount *mp,
- struct proc *p, struct iso_args *argp));
+ struct thread *td, struct iso_args *argp));
/*
* Try to find the start of the last data track on this CD-ROM. This
@@ -107,9 +107,9 @@ static int iso_mountfs __P((struct vnode *devvp, struct mount *mp,
* and return 0 if we fail, this is always a safe bet.
*/
static int
-iso_get_ssector(dev, p)
+iso_get_ssector(dev, td)
dev_t dev;
- struct proc *p;
+ struct thread *td;
{
struct ioc_toc_header h;
struct ioc_read_toc_single_entry t;
@@ -122,13 +122,13 @@ iso_get_ssector(dev, p)
if (ioctlp == NULL)
return 0;
- if (ioctlp(dev, CDIOREADTOCHEADER, (caddr_t)&h, FREAD, p) != 0)
+ if (ioctlp(dev, CDIOREADTOCHEADER, (caddr_t)&h, FREAD, td) != 0)
return 0;
for (i = h.ending_track; i >= 0; i--) {
t.address_format = CD_LBA_FORMAT;
t.track = i;
- if (ioctlp(dev, CDIOREADTOCENTRY, (caddr_t)&t, FREAD, p) != 0)
+ if (ioctlp(dev, CDIOREADTOCENTRY, (caddr_t)&t, FREAD, td) != 0)
return 0;
if ((t.entry.control & 4) != 0)
/* found a data track */
@@ -141,12 +141,12 @@ iso_get_ssector(dev, p)
return ntohl(t.entry.addr.lba);
}
-static int iso_mountroot __P((struct mount *mp, struct proc *p));
+static int iso_mountroot __P((struct mount *mp, struct thread *td));
static int
-iso_mountroot(mp, p)
+iso_mountroot(mp, td)
struct mount *mp;
- struct proc *p;
+ struct thread *td;
{
struct iso_args args;
int error;
@@ -156,14 +156,14 @@ iso_mountroot(mp, p)
return (error);
}
args.flags = ISOFSMNT_ROOT;
- args.ssector = iso_get_ssector(rootdev, p);
+ args.ssector = iso_get_ssector(rootdev, td);
if (bootverbose)
printf("iso_mountroot(): using session at block %d\n",
args.ssector);
- if ((error = iso_mountfs(rootvp, mp, p, &args)) != 0)
+ if ((error = iso_mountfs(rootvp, mp, td, &args)) != 0)
return (error);
- (void)cd9660_statfs(mp, &mp->mnt_stat, p);
+ (void)cd9660_statfs(mp, &mp->mnt_stat, td);
return (0);
}
@@ -173,12 +173,12 @@ iso_mountroot(mp, p)
* mount system call
*/
static int
-cd9660_mount(mp, path, data, ndp, p)
+cd9660_mount(mp, path, data, ndp, td)
register struct mount *mp;
char *path;
caddr_t data;
struct nameidata *ndp;
- struct proc *p;
+ struct thread *td;
{
struct vnode *devvp;
struct iso_args args;
@@ -188,7 +188,7 @@ cd9660_mount(mp, path, data, ndp, p)
struct iso_mnt *imp = 0;
if ((mp->mnt_flag & MNT_ROOTFS) != 0) {
- return (iso_mountroot(mp, p));
+ return (iso_mountroot(mp, td));
}
if ((error = copyin(data, (caddr_t)&args, sizeof (struct iso_args))))
return (error);
@@ -209,7 +209,7 @@ cd9660_mount(mp, path, data, ndp, p)
* Not an update, or updating the name: look up the name
* and verify that it refers to a sensible block device.
*/
- NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, p);
+ NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td);
if ((error = namei(ndp)))
return (error);
NDFREE(ndp, NDF_ONLY_PNBUF);
@@ -225,18 +225,18 @@ cd9660_mount(mp, path, data, ndp, p)
* or has superuser abilities
*/
accessmode = VREAD;
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
- error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
+ error = VOP_ACCESS(devvp, accessmode, td->td_proc->p_ucred, td);
if (error)
- error = suser(p);
+ error = suser_td(td);
if (error) {
vput(devvp);
return (error);
}
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, 0, td);
if ((mp->mnt_flag & MNT_UPDATE) == 0) {
- error = iso_mountfs(devvp, mp, p, &args);
+ error = iso_mountfs(devvp, mp, td, &args);
} else {
if (devvp != imp->im_devvp)
error = EINVAL; /* needs translation */
@@ -251,7 +251,7 @@ cd9660_mount(mp, path, data, ndp, p)
(void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,
&size);
bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
- (void) cd9660_statfs(mp, &mp->mnt_stat, p);
+ (void) cd9660_statfs(mp, &mp->mnt_stat, td);
return 0;
}
@@ -259,10 +259,10 @@ cd9660_mount(mp, path, data, ndp, p)
* Common code for mount and mountroot
*/
static int
-iso_mountfs(devvp, mp, p, argp)
+iso_mountfs(devvp, mp, td, argp)
register struct vnode *devvp;
struct mount *mp;
- struct proc *p;
+ struct thread *td;
struct iso_args *argp;
{
register struct iso_mnt *isomp = (struct iso_mnt *)0;
@@ -295,12 +295,12 @@ iso_mountfs(devvp, mp, p, argp)
return error;
if (vcount(devvp) > 1 && devvp != rootvp)
return EBUSY;
- if ((error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0)))
+ if ((error = vinvalbuf(devvp, V_SAVE, td->td_proc->p_ucred, td, 0, 0)))
return (error);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
- error = VOP_OPEN(devvp, FREAD, FSCRED, p);
- VOP_UNLOCK(devvp, 0, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
+ error = VOP_OPEN(devvp, FREAD, FSCRED, td);
+ VOP_UNLOCK(devvp, 0, td);
if (error)
return error;
@@ -510,7 +510,7 @@ out:
if (supbp)
brelse(supbp);
if (needclose)
- (void)VOP_CLOSE(devvp, FREAD, NOCRED, p);
+ (void)VOP_CLOSE(devvp, FREAD, NOCRED, td);
if (isomp) {
free((caddr_t)isomp, M_ISOFSMNT);
mp->mnt_data = (qaddr_t)0;
@@ -522,10 +522,10 @@ out:
* unmount system call
*/
static int
-cd9660_unmount(mp, mntflags, p)
+cd9660_unmount(mp, mntflags, td)
struct mount *mp;
int mntflags;
- struct proc *p;
+ struct thread *td;
{
register struct iso_mnt *isomp;
int error, flags = 0;
@@ -543,7 +543,7 @@ cd9660_unmount(mp, mntflags, p)
isomp = VFSTOISOFS(mp);
isomp->im_devvp->v_rdev->si_mountpoint = NULL;
- error = VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, p);
+ error = VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, td);
vrele(isomp->im_devvp);
free((caddr_t)isomp, M_ISOFSMNT);
mp->mnt_data = (qaddr_t)0;
@@ -576,10 +576,10 @@ cd9660_root(mp, vpp)
* Get file system statistics.
*/
int
-cd9660_statfs(mp, sbp, p)
+cd9660_statfs(mp, sbp, td)
struct mount *mp;
register struct statfs *sbp;
- struct proc *p;
+ struct thread *td;
{
register struct iso_mnt *isomp;
OpenPOWER on IntegriCloud