From owner-freebsd-current@FreeBSD.ORG Mon Sep 20 11:44:10 2004 Return-Path: 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 7096116A4CE for ; Mon, 20 Sep 2004 11:44:10 +0000 (GMT) Received: from lon-mail-2.gradwell.net (lon-mail-2.gradwell.net [193.111.201.126]) by mx1.FreeBSD.org (Postfix) with ESMTP id A21BF43D49 for ; Mon, 20 Sep 2004 11:44:09 +0000 (GMT) (envelope-from cbh@chrishedley.com) X-Gradwell-Debug: delivering mail for [freebsd-current@freebsd.org] to mx1.freebsd.org [216.136.204.125]:25 Received: from cpc2-oxfd4-4-0-cust119.oxfd.cable.ntl.com [80.3.246.119] (helo: mail.cbhnet)1.122) id 414ec287.014bf7.000 for freebsd-current@freebsd.org; Mon, 20 Sep 2004 12:44:07 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.cbhnet (Postfix) with ESMTP id 8FF0BC7974 for ; Mon, 20 Sep 2004 12:44:06 +0100 (BST) Received: from mail.cbhnet ([127.0.0.1]) by localhost (mail.cbhnet [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10228-01 for ; Mon, 20 Sep 2004 12:44:03 +0100 (BST) Received: from teapot.cbhnet (teapot.cbhnet [192.168.1.1]) by mail.cbhnet (Postfix) with ESMTP id 3DB22C7973 for ; Mon, 20 Sep 2004 12:44:03 +0100 (BST) Date: Sun, 19 Sep 2004 23:01:25 +0100 (BST) From: cbh-freebsd-current@groups.chrishedley.com X-X-Sender: cbh@teapot.cbhnet To: freebsd-current@freebsd.org Message-ID: <20040919225036.B1582@teapot.cbhnet> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed ReSent-Date: Mon, 20 Sep 2004 12:43:49 +0100 (BST) Resent-From: Chris Hedley Resent-To: freebsd-current@freebsd.org ReSent-Subject: Possible bug in sbin/bsdlabel.c in -CURRENT ReSent-Message-ID: <20040920124349.O6182@teapot.cbhnet> X-Virus-Scanned: by amavisd-new at chrishedley.com Subject: Possible bug in sbin/bsdlabel.c in -CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 11:44:10 -0000 Evening, chaps. I don't think anyone's brought this one up yet, and it's a little obscure... but for those of us who have MAXPARTITIONS set to a nonstandard value (16 in my case, I need some extra as I'm using a largeish RAID array that I'd like to chop into managable pieces), it seems that bsdlabel randomly hiccups with a warning about the label length being wrong ("disklabel: Wrong length label argument" after attempting to edit the label, even without making any changes). This only happens on certain discs for reasons beyond my ken, but it seems that the culprit is circa line 410 in sbin/bsdlabel/bsdlabel.c which currently says gctl_ro_param(grq, "label", 148+16*8); but which I'm guessing should say gctl_ro_param(grq, "label", 148+16*MAXPARTITIONS); The modification seems to work on my -CURRENT box without causing any obvious harm, so I thought I'd mention it here to see what people think. Cheers, Chris. PS Just to clarify, the discs which the unmodified disklabel worked on are <40GB SCSI units attached to AIC 789x channels, and the one which it didn't work on is a 450GB RAID-10 aac (2410SA) array.