From owner-cvs-all@FreeBSD.ORG Fri May 2 15:46:14 2003 Return-Path: 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 5E62C37B401; Fri, 2 May 2003 15:46:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A59643FAF; Fri, 2 May 2003 15:46:14 -0700 (PDT) (envelope-from phk@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h42MkD0U051586; Fri, 2 May 2003 15:46:13 -0700 (PDT) (envelope-from phk@repoman.freebsd.org) Received: (from phk@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h42MkDuK051585; Fri, 2 May 2003 15:46:13 -0700 (PDT) Message-Id: <200305022246.h42MkDuK051585@repoman.freebsd.org> From: Poul-Henning Kamp Date: Fri, 2 May 2003 15:46:13 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/geom geom_bsd.c geom_bsd_enc.c src/sys/sys disklabel.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2003 22:46:14 -0000 phk 2003/05/02 15:46:13 PDT FreeBSD src repository Modified files: sys/geom geom_bsd.c geom_bsd_enc.c sys/sys disklabel.h Log: Make bsd_disklabel_le_enc calculate the checksum and fill it in. (If there is a legitimate need to correctly encode and pack a disklabel with an invalid checksum custom tools can be built for that.) Make bsd_disklabel_le_dec() validate the magics, number of partitions (against a new parameter) and the checksum. Vastly simplify the logic of the GEOM::BSD class implementation: Let g_bsd_modify() always take a byte-stream label. This simplifies all users, except the ioctl's which now have to convert to a byte-stream first. Their loss. g_bsd_modify() is called with topology held now, and it returns with it held. Always update the md5sum in g_bsd_modify(), otherwise the check is no use after the first modification of the label. Make the MD5 over the bytestream version of the label. Move the rawoffset hack to g_bsd_modify() and remove all the inram/ondisk conversions. Don't configure hotspots in g_bsd_modify(), do it in taste instead, we do not support moving the label to a different location on the fly anyway. This passes all current regression tests. Revision Changes Path 1.53 +108 -262 src/sys/geom/geom_bsd.c 1.3 +40 -5 src/sys/geom/geom_bsd_enc.c 1.102 +1 -1 src/sys/sys/disklabel.h