From owner-freebsd-current Sun Jan 19 7: 4:15 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D7DB37B401 for ; Sun, 19 Jan 2003 07:04:13 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC00743EB2 for ; Sun, 19 Jan 2003 07:04:12 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h0JF3isK008695 for ; Sun, 19 Jan 2003 16:03:44 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: current@freebsd.org Subject: HEADSUP: CCD(4) hackery... Date: Sun, 19 Jan 2003 16:03:44 +0100 Message-ID: <8694.1042988624@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ------- Forwarded Message From: Poul-Henning Kamp Date: Sun, 19 Jan 2003 07:00:58 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org phk 2003/01/19 07:00:58 PST Modified files: sys/sys ccdvar.h sys/dev/ccd ccd.c Log: Finally give CCD the disk mini-layer treatment: CAUTION: Previously CCD would be different from all other disks in the system in that there were no "ccd0" device, only a "ccd0c" device. This is no longer so after this commit. If you access a ccd device through the "/dev/ccd0c" device _and_ have not actually put a BSD disklabel on the device, you will have to use the name "/dev/ccd0". If your CCD device contains a BSD disklabel there should be no difference. You need to recompile ccdconfig(8) using the changed src/sys/sys/ccdvar.h for the -g "show me" option to work. I have run the regression test I created before I started overhauling CCD and it flags no problems, but this code is mildly evil, so take care. If you would cry if you lost what's on CCD, make a back before you upgrade. Create separate cdevsw for the /dev/ccd.ctl device. Remove the cloning function, the disk-minilayer will do all naming for us. Remove the ccdunit and ccdpart functions and carry the softc pointer in the relevant dev_t's and structures. Release all memory when a CCD device is unconfigured, previously the softc would linger behind. Remove all traces of BSD disklabel fiddling code. Remove ccdpsize, the disk mini-layer does this for us. Don't allocate memory with M_WAITOK in ccdstrategy(). Remove boundary checks which the disk mini-layer does for us. Don't allocate space for more than 2 ccdbuf, RAID was never implemented. NB: I have not tried to address any of the preexisting ailments of CCD. Revision Changes Path 1.121 +143 -431 src/sys/dev/ccd/ccd.c 1.15 +2 -1 src/sys/sys/ccdvar.h ------- End of Forwarded Message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message