Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2002 14:01:47 +1030
From:      Greg 'groggy' Lehey <grog@FreeBSD.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        kalts@estpak.ee, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/vinum vinumioctl.c
Message-ID:  <20021205033147.GI91963@wantadilla.lemis.com>
In-Reply-To: <92539.1038911567@critter.freebsd.dk>
References:  <20021203100440.GA1652@tiiu.internal> <92539.1038911567@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday,  3 December 2002 at 11:32:47 +0100, Poul-Henning Kamp wrote:
> In message <20021203100440.GA1652@tiiu.internal>, Vallo Kallaste writes:
>> On Mon, Dec 02, 2002 at 03:56:59PM -0800, Greg Lehey
>> <grog@FreeBSD.org> wrote:
>>
>>> grog        2002/12/02 15:56:59 PST
>>>
>>>   Modified files:
>>>     sys/dev/vinum        vinumioctl.c
>>>   Log:
>>>   Implement DIOCGDINFO for volumes.  newfs will no longer build a file
>>>   system on a volume without a disk label.
>>>
>>>   Approved by: re (rwatson)
>>
>> It's the reverse currently as I understand. The vinum(8) states that
>> "vinum label somevolume" is deprecated and not needed for newfs(8).
>> The man page needs to be fixed. If I'm mistaken please ignore me.
>
> My guess on this trouble is that vinum kludges up the answers to the
> DIOCGMEDIASIZE and DIOCGSECTORSIZE ioctls from the BSD label, and
> fails if there isn't one.

Well, no.  DIOCGMEDIASIZE and DIOCGSECTORSIZE are easy enough to
calculate.  The real issue is that newfs follows up with a DIOCGDINFO
call:

   331 newfs    CALL  ioctl(0x3,DIOCGSECTORSIZE,0x809db68)
   331 newfs    RET   ioctl 0
   331 newfs    CALL  ioctl(0x3,DIOCGMEDIASIZE,0xbfbff1a0)
   331 newfs    RET   ioctl 0
   331 newfs    CALL  ioctl(0x3,DIOCGDINFO,0x806a960)
   331 newfs    RET   ioctl -1 errno 25 Inappropriate ioctl for device

Most of the time this isn't serious (see the code for the reasons),
but a couple of weeks ago I had a case where this made it impossible
to newfs a Vinum volume.  This is probably a side effect of the
transition to GEOM; the old version works again.  Still, it makes more
sense to give plausible values for the label if asked.

Greg
--
See complete headers for address and phone numbers

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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