From owner-cvs-all Mon Apr 30 7:49:21 2001 Delivered-To: cvs-all@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 81CC237B422; Mon, 30 Apr 2001 07:49:15 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f3UEnFR12870; Mon, 30 Apr 2001 07:49:15 -0700 (PDT) Date: Mon, 30 Apr 2001 07:49:15 -0700 From: Alfred Perlstein To: Bruce Evans Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/miscfs/specfs spec_vnops.c Message-ID: <20010430074915.C18676@fw.wintelcom.net> References: <200104301435.f3UEZbX08864@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200104301435.f3UEZbX08864@freefall.freebsd.org>; from bde@FreeBSD.org on Mon, Apr 30, 2001 at 07:35:37AM -0700 X-all-your-base: are belong to us. Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Bruce Evans [010430 07:36] wrote: > bde 2001/04/30 07:35:37 PDT > > Modified files: > sys/miscfs/specfs spec_vnops.c > Log: > Backed out previous commit. It cause massive filesystem corruption, > not to mention a compile-time warning about the critical function > becoming unused, by replacing spec_bmap() with vop_stdbmap(). > > ntfs seems to have the same bug. > > The factor for converting specfs block numbers to physical block > numbers is 1, but vop_stdbmap() uses the bogus factor > btodb(ap->a_vp->v_mount->mnt_stat.f_iosize), which is 16 for ffs with > the default block size of 8K. This factor is bogus even for vop_stdbmap() > -- the correct factor is related to the filesystem blocksize which is not > necessarily the same to the optimal i/o size. vop_stdbmap() was apparently > cloned from nfs where these sizes happen to be the same. > > There may also be a problem with a_vp->v_mount being null. spec_bmap() > still checks for this, but I think the checks in specfs are dead code > which used to support block devices. This explains why my dev box's / contains only a lost+found I imagine? :) -- -Alfred Perlstein - [alfred@freebsd.org] Represent yourself, show up at BABUG http://www.babug.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message