From owner-freebsd-stable Tue Aug 15 12:56:11 2000 Delivered-To: freebsd-stable@freebsd.org Received: from mail3.megatrends.com (mail3.megatrends.com [155.229.80.33]) by hub.freebsd.org (Postfix) with ESMTP id 7B29B37B9EC; Tue, 15 Aug 2000 12:56:04 -0700 (PDT) (envelope-from vineshc@ami.com) Received: by atl_es1.megatrends.com with Internet Mail Service (5.0.1461.28) id ; Tue, 15 Aug 2000 16:01:46 -0400 Message-ID: <4A78850EF802D211BB3900805FFE55550BA88A@atl_es1.megatrends.com> From: Vinesh Christopher To: 'Sheldon Hearn' , phk@FreeBSD.org Cc: "'freebsd-stable@freebsd.org'" Subject: Solution for using the second memory disk md1 (malloc disk) in 4. 1-STABLE Date: Tue, 15 Aug 2000 16:01:43 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1461.28) Content-Type: text/plain Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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