From owner-cvs-all Fri Sep 20 12:36: 8 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 357C737B401; Fri, 20 Sep 2002 12:36:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C30BB43E6E; Fri, 20 Sep 2002 12:36:05 -0700 (PDT) (envelope-from phk@FreeBSD.org) Received: from freefall.freebsd.org (phk@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8KJa5Co058875; Fri, 20 Sep 2002 12:36:05 -0700 (PDT) (envelope-from phk@freefall.freebsd.org) Received: (from phk@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8KJa5x8058874; Fri, 20 Sep 2002 12:36:05 -0700 (PDT) Message-Id: <200209201936.g8KJa5x8058874@freefall.freebsd.org> From: Poul-Henning Kamp Date: Fri, 20 Sep 2002 12:36:05 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/cam/scsi scsi_cd.c scsi_da.c src/sys/contrib/dev/fla fla.c src/sys/dev/aac aac_disk.c src/sys/dev/amr amr_disk.c src/sys/dev/ata ata-disk.c ata-raid.c atapi-fd.c src/sys/dev/ccd ccd.c src/sys/dev/ida ida_disk.c ... X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG phk 2002/09/20 12:36:05 PDT Modified files: sys/cam/scsi scsi_cd.c scsi_da.c sys/contrib/dev/fla fla.c sys/dev/aac aac_disk.c sys/dev/amr amr_disk.c sys/dev/ata ata-disk.c ata-raid.c atapi-fd.c sys/dev/ccd ccd.c sys/dev/ida ida_disk.c sys/dev/md md.c sys/dev/mlx mlx_disk.c sys/dev/ofw ofw_disk.c sys/dev/pst pst-raid.c sys/dev/twe twe_freebsd.c sys/geom geom_disk.c sys/ia64/ia64 sscdisk.c sys/kern subr_disk.c subr_disklabel.c sys/pc98/pc98 wd.c sys/sys disk.h Log: (This commit touches about 15 disk device drivers in a very consistent and predictable way, and I apologize if I have gotten it wrong anywhere, getting prior review on a patch like this is not feasible, considering the number of people involved and hardware availability etc.) If struct disklabel is the messenger: kill the messenger. Inside struct disk we had a struct disklabel which disk drivers used to communicate certain metrics to the disklayer above (GEOM or the disk mini-layer). This commit changes this communication to use four explicit fields instead. Amongst the benefits is that the fields do not get overwritten by wrong or bogus on-disk disklabels. Once that is clear, which is included in the drivers no longer need to pull and in, the few places that needs them, have gotten explicit #includes for them. The disklabel inside struct disk is now only for internal use in the disk mini-layer, so instead of embedding it, we malloc it as we need it. This concludes (modulus any mistakes) the series of disklabel related commits. I belive it all amounts to a NOP for all the rest of you :-) Sponsored by: DARPA & NAI Labs. Revision Changes Path 1.60 +7 -37 src/sys/cam/scsi/scsi_cd.c 1.108 +5 -27 src/sys/cam/scsi/scsi_da.c 1.32 +6 -7 src/sys/contrib/dev/fla/fla.c 1.24 +4 -11 src/sys/dev/aac/aac_disk.c 1.18 +5 -11 src/sys/dev/amr/amr_disk.c 1.136 +4 -8 src/sys/dev/ata/ata-disk.c 1.48 +4 -9 src/sys/dev/ata/ata-raid.c 1.78 +6 -8 src/sys/dev/ata/atapi-fd.c 1.109 +1 -0 src/sys/dev/ccd/ccd.c 1.33 +4 -10 src/sys/dev/ida/ida_disk.c 1.68 +5 -10 src/sys/dev/md/md.c 1.23 +5 -11 src/sys/dev/mlx/mlx_disk.c 1.2 +5 -13 src/sys/dev/ofw/ofw_disk.c 1.3 +4 -9 src/sys/dev/pst/pst-raid.c 1.15 +4 -12 src/sys/dev/twe/twe_freebsd.c 1.15 +8 -11 src/sys/geom/geom_disk.c 1.17 +4 -9 src/sys/ia64/ia64/sscdisk.c 1.59 +7 -1 src/sys/kern/subr_disk.c 1.72 +1 -0 src/sys/kern/subr_disklabel.c 1.126 +4 -9 src/sys/pc98/pc98/wd.c 1.26 +8 -8 src/sys/sys/disk.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message