From owner-freebsd-geom@FreeBSD.ORG Fri Apr 6 04:36:47 2012 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27A75106566C for ; Fri, 6 Apr 2012 04:36:47 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mail.kirov.so-ups.ru (mail.kirov.so-ups.ru [178.74.170.1]) by mx1.freebsd.org (Postfix) with ESMTP id C02888FC1D for ; Fri, 6 Apr 2012 04:36:46 +0000 (UTC) Received: from kas30pipe.localhost (localhost.kirov.so-ups.ru [127.0.0.1]) by mail.kirov.so-ups.ru (Postfix) with SMTP id 1F2E8B8029; Fri, 6 Apr 2012 08:36:40 +0400 (MSK) Received: from kirov.so-ups.ru (unknown [172.21.81.1]) by mail.kirov.so-ups.ru (Postfix) with ESMTP id 19DA8B8028; Fri, 6 Apr 2012 08:36:40 +0400 (MSK) Received: by ns.kirov.so-ups.ru (Postfix, from userid 1010) id 015CABA01C; Fri, 6 Apr 2012 08:36:40 +0400 (MSK) Received: from [127.0.0.1] (elsukov.kirov.oduur.so [10.118.3.52]) by ns.kirov.so-ups.ru (Postfix) with ESMTP id B1888BA008; Fri, 6 Apr 2012 08:36:39 +0400 (MSK) Message-ID: <4F7E72D7.6040501@FreeBSD.org> Date: Fri, 06 Apr 2012 08:36:39 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Bengt Ahlgren References: <201204052210.q35MA5gt065889@freefall.freebsd.org> In-Reply-To: <201204052210.q35MA5gt065889@freefall.freebsd.org> X-Enigmail-Version: 1.4 Content-Type: multipart/mixed; boundary="------------020200020100040002090800" X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release X-SpamTest-Info: Not protected Cc: freebsd-geom@FreeBSD.org Subject: Re: bin/165789: bsdlabel(8): partition c doesn't cover the whole unit! X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2012 04:36:47 -0000 This is a multi-part message in MIME format. --------------020200020100040002090800 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit On 06.04.2012 2:10, Bengt Ahlgren wrote: > bsdlabel: partition c doesn't cover the whole unit! > bsdlabel: An incorrect partition c may cause problems for standard system utilities > > I added a printout of the value bsdlabel compares with: > > bsdlabel: partition c doesn't cover the whole unit! 1953525168 > > This number corresponds to the size of the whole disk, not the size of > the slice, so lp->d_secperunit is not the right variable to use, or is > incorrectly set. > > Finally, I stepped back to r220455 (in stable/8). That version of > bsdlabel did not complain, so it seems that r227564 by ae (cc:d) is > causing, or making visible, this problem. Hi, Thank you for your report. Yes, r227564 has made visible a known sysinstall's bug. GEOM_PART_BSD already has quirk that automatically fixes it, can you try attached patch? -- WBR, Andrey V. Elsukov --------------020200020100040002090800 Content-Type: text/plain; charset=windows-1251; name="bsdlabel.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bsdlabel.diff" Index: head/sbin/bsdlabel/bsdlabel.c =================================================================== --- head/sbin/bsdlabel/bsdlabel.c (revision 233932) +++ head/sbin/bsdlabel/bsdlabel.c (working copy) @@ -1194,7 +1194,8 @@ checklabel(struct disklabel *lp) lp->d_interleave = vl->d_interleave; if (lp->d_secpercyl == 0) lp->d_secpercyl = vl->d_secpercyl; - if (lp->d_secperunit == 0) + if (lp->d_secperunit == 0 || /* Fix-up a sysinstall bug. */ + lp->d_secperunit > vl->d_secperunit) lp->d_secperunit = vl->d_secperunit; if (lp->d_bbsize == 0) lp->d_bbsize = vl->d_bbsize; --------------020200020100040002090800--