Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Aug 2000 16:01:43 -0400
From:      Vinesh Christopher <vineshc@ami.com>
To:        'Sheldon Hearn' <sheldonh@uunet.co.za>, phk@FreeBSD.org
Cc:        "'freebsd-stable@freebsd.org'" <freebsd-stable@freebsd.org>
Subject:   Solution for using the second memory disk md1 (malloc disk) in 4. 1-STABLE 
Message-ID:  <4A78850EF802D211BB3900805FFE55550BA88A@atl_es1.megatrends.com>

next in thread | raw e-mail | index | archive | help
While debugging I found out diskopen of /dev/md1 failed because 
the si_disk is null in the dev_t structure. Tracing back to the
initialization 
of /dev/md1 in md.c found a  invalid last paramerter is passed to 
disk_create() from mdcreate(). For the first disk /dev/md0, it is
initialized 
by the disk_create() and so it worked.

I did the following patch and it worked. 

81,82d80
< static struct cdevsw mddisk_cdevsw;
< 
352,353c350
< 	sc->dev = disk_create(sc->unit, &sc->disk, 0, devsw,
&mddisk_cdevsw);
< 	sc->devsw= mddisk_cdevsw;	
---
> 	sc->dev = disk_create(sc->unit, &sc->disk, 0, devsw, &sc->devsw);


I looked into -current development and saw a similiar code except the line 
"sc->devsw=mddisk_cdevsw;"

Can you verify this patch and if it is ok you can commit to the 4.1-STABLE

Thanks for all the help.

Regards
Vinesh



> -----Original Message-----
> From:	Vinesh Christopher [SMTP:vineshc@ami.com]
> Sent:	Tuesday, August 15, 2000 1:06 PM
> To:	'Sheldon Hearn'
> Cc:	'freebsd-stable@freebsd.org'; phk@FreeBSD.org
> Subject:	RE: How to use the second memory disk md1 (malloc disk) in
> 4.1-ST ABLE 
> 
> Thanks. I'll start debugging the 4.1-STABLE driver and inform you if 
> I find anything interesting.
> 
> > -----Original Message-----
> > From:	Sheldon Hearn [SMTP:sheldonh@uunet.co.za]
> > Sent:	Tuesday, August 15, 2000 12:05 PM
> > To:	Vinesh Christopher
> > Cc:	'freebsd-stable@freebsd.org'; phk@FreeBSD.org
> > Subject:	Re: How to use the second memory disk md1 (malloc disk) in
> > 4.1-STABLE 
> > 
> > 
> > 
> > On Tue, 15 Aug 2000 11:39:35 -0400, Vinesh Christopher wrote:
> > 
> > > I tried the example with md1 it failed in disklabel
> > > disklabel: /dev/md1c: Device not configured
> > 
> > I've never seen that.  I seem to be able to create as many
> > malloc(9)-backed md devices as I fancy.  However, I'm using the
> > development head for FreeBSD.  From what I can tell, the version of
> > md(4) in 4.1-STABLE does not feature the almost-clone feature.
> > 
> > You'd best ask Poul-Henning Kamp <phk@FreeBSD.org> about this.  If the
> > manual page is wrong about almost-clone behaviour in 4.1-STABLE, let me
> > know< since that would have been my cock-up.
> > 
> > Ciao,
> > Sheldon.
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-stable" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A78850EF802D211BB3900805FFE55550BA88A>