Re: vinum crashing with latest current

From: Daryl Chance <chancedj_at_yahoo.com>
Date: Mon, 21 Jun 2004 21:40:42 -0700 (PDT)
--- Colin Percival <colin.percival_at_wadham.ox.ac.uk>
wrote:
> At 04:53 22/06/2004, Daryl Chance wrote:
> >[summary: vinum is breaking, with a null pointer
> dereference]
> 
> In sys/dev/vinum/vinumio.c we find (existing in
> various forms for
> the past four years):
>     71          drive->lasterror = (dsw->d_open)
> (drive->dev, FWRITE | FREAD, 0, NULL);
> 
> while in src/sys/geom/geom_dev.c we find (added
> three days ago):
>    151  g_dev_open(struct cdev *dev, int flags, int
> fmt, struct thread *td)
> ....
>    177                error =
> securelevel_ge(td->td_ucred, 2);
> 
> Now, I'm not sure which of these is correct, but ONE
> of the following
> two patches should be applied:
> --- src/sys/dev/vinum/vinumio.c	17 Jun 2004 17:16:47
> -0000	1.99
> +++ src/sys/dev/vinum/vinumio.c	22 Jun 2004 04:29:08
> -0000
> _at__at_ -68,7 +68,7 _at__at_ open_drive(struct drive *drive,
> struct t
>  	drive->lasterror = ENOTBLK;
>      else {
>          DROP_GIANT();
> -	drive->lasterror = (dsw->d_open) (drive->dev,
> FWRITE | FREAD, 0, NULL);
> +	drive->lasterror = (dsw->d_open) (drive->dev,
> FWRITE | FREAD, 0, td);
>          PICKUP_GIANT();
>      }

I just tested this and it worked.  Thanks.  I'll wait
for an official response to my other email (since my
dead volume could be of help to debug geom_vinum and
get it closer to production level).  But I appreciate
the quick response :).

mp3# kldstat
Id Refs Address    Size     Name
 1    3 0xc0400000 5ac0ec   kernel
 2   14 0xc09ad000 4cf78    acpi.ko
mp3# vinum
vinum -> list
0 drives:
0 volumes:
0 plexes:
0 subdisks:
vinum -> start
vinum -> list
2 drives:
D drive2                State: up       /dev/ad6s1d   
 A: 0/29333 MB (0%)
D drive1                State: up       /dev/ad4s1d   
 A: 0/29333 MB (0%)

1 volumes:
V mp3                   State: up       Plexes:      
2 Size:         28 GB

2 plexes:
P mp3.p0              C State: up       Subdisks:    
1 Size:         28 GB
P mp3.p1              C State: faulty   Subdisks:    
1 Size:         28 GB

2 subdisks:
S mp3.p0.s0             State: up       D: drive1     
 Size:         28 GB
S mp3.p1.s0             State: empty    D: drive2     
 Size:         28 GB
vinum -> quit
mp3#


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Received on Tue Jun 22 2004 - 02:40:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:58 UTC