From owner-cvs-all Wed Dec 4 19:31:54 2002 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 7752C37B401; Wed, 4 Dec 2002 19:31:52 -0800 (PST) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id C95F843ECF; Wed, 4 Dec 2002 19:31:50 -0800 (PST) (envelope-from grog@lemis.com) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id AEF3B51922; Thu, 5 Dec 2002 14:01:47 +1030 (CST) Date: Thu, 5 Dec 2002 14:01:47 +1030 From: Greg 'groggy' Lehey To: Poul-Henning Kamp 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> References: <20021203100440.GA1652@tiiu.internal> <92539.1038911567@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92539.1038911567@critter.freebsd.dk> User-Agent: Mutt/1.4i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 >> 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