summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2007-07-18 19:04:58 +0000
committerad <ad@NetBSD.org>2007-07-18 19:04:58 +0000
commit1c0f1b255be218630078d883eee45f468738f7a2 (patch)
tree57d85822a25efeef5dd55d7b6ac05ecafddd61a9 /sys/dev/raidframe
parentaaae7fb8c2dd4954325ac4e38662e15eef7121e2 (diff)
Fix fallout from recent kthread changes.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_copyback.c6
-rw-r--r--sys/dev/raidframe/rf_disks.c6
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c10
-rw-r--r--sys/dev/raidframe/rf_reconstruct.c6
-rw-r--r--sys/dev/raidframe/rf_threadstuff.h8
5 files changed, 17 insertions, 19 deletions
diff --git a/sys/dev/raidframe/rf_copyback.c b/sys/dev/raidframe/rf_copyback.c
index 248214bd69d..4640680ef07 100644
--- a/sys/dev/raidframe/rf_copyback.c
+++ b/sys/dev/raidframe/rf_copyback.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_copyback.c,v 1.38 2007/06/26 15:22:24 cube Exp $ */
+/* $NetBSD: rf_copyback.c,v 1.39 2007/07/18 19:04:58 ad Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -38,7 +38,7 @@
****************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.38 2007/06/26 15:22:24 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.39 2007/07/18 19:04:58 ad Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -116,7 +116,7 @@ rf_CopybackReconstructedData(RF_Raid_t *raidPtr)
badDisk = &raidPtr->Disks[fcol];
- l = LIST_FIRST(&raidPtr->engine_thread->p_lwps);
+ l = raidPtr->engine_thread;
/* This device may have been opened successfully the first time. Close
* it before trying to open it again.. */
diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c
index f0915283d34..b85880afe08 100644
--- a/sys/dev/raidframe/rf_disks.c
+++ b/sys/dev/raidframe/rf_disks.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_disks.c,v 1.66 2007/06/26 15:22:24 cube Exp $ */
+/* $NetBSD: rf_disks.c,v 1.67 2007/07/18 19:04:58 ad Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -67,7 +67,7 @@
***************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.66 2007/06/26 15:22:24 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.67 2007/07/18 19:04:58 ad Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -587,7 +587,7 @@ rf_ConfigureDisk(RF_Raid_t *raidPtr, char *bf, RF_RaidDisk_t *diskPtr,
}
(void) strcpy(diskPtr->devname, p);
- l = LIST_FIRST(&raidPtr->engine_thread->p_lwps);
+ l = raidPtr->engine_thread;
/* Let's start by claiming the component is fine and well... */
diskPtr->status = rf_ds_optimal;
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 8f6521fa155..11359d9e1c3 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.228 2007/06/24 21:38:21 christos Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.229 2007/07/18 19:04:58 ad Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -146,7 +146,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.228 2007/06/24 21:38:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.229 2007/07/18 19:04:58 ad Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -2526,11 +2526,9 @@ rf_update_component_labels(RF_Raid_t *raidPtr, int final)
void
rf_close_component(RF_Raid_t *raidPtr, struct vnode *vp, int auto_configured)
{
- struct proc *p;
struct lwp *l;
- p = raidPtr->engine_thread;
- l = LIST_FIRST(&p->p_lwps);
+ l = curlwp;
if (vp != NULL) {
if (auto_configured == 1) {
@@ -2539,7 +2537,7 @@ rf_close_component(RF_Raid_t *raidPtr, struct vnode *vp, int auto_configured)
vput(vp);
} else {
- (void) vn_close(vp, FREAD | FWRITE, p->p_cred, l);
+ (void) vn_close(vp, FREAD | FWRITE, l->l_cred, l);
}
}
}
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c
index 95fa6d9e050..7dae2528cc3 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.97 2007/07/09 21:01:20 ad Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.98 2007/07/18 19:04:58 ad 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.97 2007/07/09 21:01:20 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.98 2007/07/18 19:04:58 ad Exp $");
#include <sys/param.h>
#include <sys/time.h>
@@ -412,7 +412,7 @@ rf_ReconstructInPlace(RF_Raid_t *raidPtr, RF_RowCol_t col)
return (EINVAL);
}
#endif
- lwp = LIST_FIRST(&raidPtr->engine_thread->p_lwps);
+ lwp = raidPtr->engine_thread;
/* This device may have been opened successfully the
first time. Close it before trying to open it again.. */
diff --git a/sys/dev/raidframe/rf_threadstuff.h b/sys/dev/raidframe/rf_threadstuff.h
index 1f0f887a3ed..975869f8113 100644
--- a/sys/dev/raidframe/rf_threadstuff.h
+++ b/sys/dev/raidframe/rf_threadstuff.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_threadstuff.h,v 1.22 2007/07/09 21:01:20 ad Exp $ */
+/* $NetBSD: rf_threadstuff.h,v 1.23 2007/07/18 19:04:59 ad Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -54,7 +54,7 @@
#define decl_simple_lock_data(a,b) a struct simplelock b;
-typedef struct proc *RF_Thread_t;
+typedef struct lwp *RF_Thread_t;
typedef void *RF_ThreadArg_t;
#define RF_DECLARE_MUTEX(_m_) decl_simple_lock_data(,(_m_))
@@ -88,11 +88,11 @@ typedef void *RF_ThreadArg_t;
#define RF_BROADCAST_COND(_c_) wakeup(&(_c_))
#define RF_CREATE_THREAD(_handle_, _func_, _arg_, _name_) \
kthread_create(PRI_NONE, 0, NULL, (void (*)(void *))(_func_), \
- (void *)(_arg_), (struct lwp **)&(_handle_), _name_)
+ (void *)(_arg_), &(_handle_), _name_)
#define RF_CREATE_ENGINE_THREAD(_handle_, _func_, _arg_, _fmt_, _fmt_arg_) \
kthread_create(PRI_NONE, 0, NULL, (void (*)(void *))(_func_), \
- (void *)(_arg_), (struct lwp **)&(_handle_), _fmt_, _fmt_arg_)
+ (void *)(_arg_), &(_handle_), _fmt_, _fmt_arg_)
#define rf_mutex_init(m) simple_lock_init(m)