Fix fallout from recent kthread changes.
This commit is contained in:
parent
aaae7fb8c2
commit
1c0f1b255b
|
@ -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.. */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.. */
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue