diff options
| author | darrenr <darrenr@NetBSD.org> | 2003-06-28 14:20:43 +0000 |
|---|---|---|
| committer | darrenr <darrenr@NetBSD.org> | 2003-06-28 14:20:43 +0000 |
| commit | 960df3c8d11a934b85f6f7d3ac388ec5ee57c12f (patch) | |
| tree | 04eacdb0da6eefa4c57bf27833661e791d6a5853 /sys/dev/raidframe/rf_reconstruct.c | |
| parent | da6b84e29093b9bfc2c3f38bfa199d379d8984d5 (diff) | |
Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.
Bump the kernel rev up to 1.6V
Diffstat (limited to 'sys/dev/raidframe/rf_reconstruct.c')
| -rw-r--r-- | sys/dev/raidframe/rf_reconstruct.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index 125d1860edc..221fd1eb72f 100644 --- a/sys/dev/raidframe/rf_reconstruct.c +++ b/sys/dev/raidframe/rf_reconstruct.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.c,v 1.54 2003/04/10 04:11:50 simonb Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.55 2003/06/28 14:21:42 darrenr Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ ************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.54 2003/04/10 04:11:50 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.55 2003/06/28 14:21:42 darrenr Exp $"); #include <sys/time.h> #include <sys/buf.h> @@ -409,7 +409,7 @@ rf_ReconstructInPlace(raidPtr, row, col) struct partinfo dpart; struct vnode *vp; struct vattr va; - struct proc *proc; + struct lwp *lwp; int retcode; int ac; @@ -457,7 +457,7 @@ rf_ReconstructInPlace(raidPtr, row, col) return (EINVAL); } - proc = raidPtr->engine_thread; + lwp = LIST_FIRST(&raidPtr->engine_thread->p_lwps); /* This device may have been opened successfully the first time. Close it before trying to open it again.. */ @@ -483,7 +483,7 @@ rf_ReconstructInPlace(raidPtr, row, col) #endif RF_UNLOCK_MUTEX(raidPtr->mutex); retcode = raidlookup(raidPtr->Disks[row][col].devname, - proc, &vp); + lwp, &vp); if (retcode) { printf("raid%d: rebuilding: raidlookup on device: %s failed: %d!\n",raidPtr->raidid, @@ -501,15 +501,15 @@ rf_ReconstructInPlace(raidPtr, row, col) /* Ok, so we can at least do a lookup... How about actually getting a vp for it? */ - if ((retcode = VOP_GETATTR(vp, &va, proc->p_ucred, - proc)) != 0) { + if ((retcode = VOP_GETATTR(vp, &va, lwp->l_proc->p_ucred, + lwp)) != 0) { RF_LOCK_MUTEX(raidPtr->mutex); raidPtr->reconInProgress--; RF_UNLOCK_MUTEX(raidPtr->mutex); return(retcode); } retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, - FREAD, proc->p_ucred, proc); + FREAD, lwp->l_proc->p_ucred, lwp); if (retcode) { RF_LOCK_MUTEX(raidPtr->mutex); raidPtr->reconInProgress--; |
