Sunday, February 26, 2006

There's a bug in my raidframe, dear Liza dear Liza


Date: Sun, 26 Feb 2006 01:38:18 -0500
From: John Eisenschmidt
To: Pedro Martelletto
Subject: Re: raid(4) users, please test this

Pedro,

FYI, I was having ongoing panics running raidframe on 3.2. Rebooting after the panic would work for a while until this past Friday when rebooting no longer fixed the problem. I built a 3.8 machine with raidframe and attached the drives from my 3.2 box and it still caused them to panic. This patch did however fix the problem, so I would suggest moving this over into -STABLE for 3.9.

Thanks,
John

----- Pedro Martelletto wrote: -----
> It'd be greatly appreciated if raid(4) users could test the diff below.
> If anyone needs more information as to what it does, please don't
> hesitate in contacting me privately.
>
> -p.
>
> Index: rf_openbsdkintf.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/raidframe/rf_openbsdkintf.c,v
> retrieving revision 1.27
> diff -u -r1.27 rf_openbsdkintf.c
> --- rf_openbsdkintf.c 28 Nov 2004 02:47:14 -0000 1.27
> +++ rf_openbsdkintf.c 14 Sep 2005 16:52:01 -0000
> @@ -2596,18 +2596,15 @@
> void
> rf_close_component(RF_Raid_t *raidPtr, struct vnode *vp, int auto_configured)
> {
> - struct proc *p;
> -
> - if ((p = raidPtr->engine_thread) == NULL)
> - p = curproc;
> + struct proc *p = curproc;
>
> if (vp != NULL) {
> if (auto_configured == 1) {
> - VOP_CLOSE(vp, FREAD | FWRITE, NOCRED, p);
> + /* component was opened by rf_find_raid_components() */
> + VOP_CLOSE(vp, FREAD | FWRITE, NOCRED, NULL);
> vrele(vp);
> } else {
> - if (VOP_ISLOCKED(vp))
> - VOP_UNLOCK(vp, 0, p);
> + /* component was opened by raidlookup() */
> (void) vn_close(vp, FREAD | FWRITE, p->p_ucred, p);
> }
> } else {


References: | [1] | [2] |

Big, big, big ups to George for helping me out with this. He still needs to pick out his iPod.

No comments: