Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Sep 2004 23:01:25 +0100 (BST)
From:      cbh-freebsd-current@groups.chrishedley.com
To:        freebsd-current@freebsd.org
Subject:   Possible bug in sbin/bsdlabel.c in -CURRENT
Message-ID:  <20040919225036.B1582@teapot.cbhnet>
Resent-Message-ID: <20040920124349.O6182@teapot.cbhnet>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040919225036.B1582>