From owner-freebsd-fs@FreeBSD.ORG Fri Jun 11 16:32:25 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB23716A4CE for ; Fri, 11 Jun 2004 16:32:25 +0000 (GMT) Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BED543D58 for ; Fri, 11 Jun 2004 16:32:25 +0000 (GMT) (envelope-from brian@classicalguitar.net) Received: from [192.168.1.100] (12-217-90-214.client.mchsi.com[12.217.90.214]) by sccmmhc91.asp.att.net (sccmmhc91) with SMTP id <20040611163148m9100cqq1oe>; Fri, 11 Jun 2004 16:31:48 +0000 Mime-Version: 1.0 (Apple Message framework v618) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=fixed To: fs@freebsd.org From: Brian Bergstrand Date: Fri, 11 Jun 2004 11:31:47 -0500 X-Pgp-Rfc2646-Fix: 1 X-Mailer: Apple Mail (2.618) Subject: Ext2 vs UFS getlbns X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2004 16:32:26 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I just noticed something in ext2_getlbns() (ext2_bmap.c, v1.57) vs. ufs_getlbns() (ufs_bmap.c, v1.60) In the last loop to setup the indir array, UFS does: { ... blockcnt /= MNINDIR(ump); off = (bn / blockcnt) % MNINDIR(ump); ++numlevels; ap->in_lbn = metalbn; ap->in_off = off; ap->in_exists = 0; ++ap; metalbn -= -1 + off * blockcnt; } While Ext2 does: { ... off = (bn / blockcnt) % MNINDIR(ump); ++numlevels; ap->in_lbn = metalbn; ap->in_off = off; ap->in_exists = 0; ++ap; metalbn -= -1 + off * blockcnt; blockcnt /= MNINDIR(ump); } Notice that blockcnt is changed AFTER offset/metalbn in Ext2 and BEFORE those in UFS. Was this change in Ext2 done on purpose for some reason? It makes a difference in calculating in_off and metalbn for some block #'s. Thanks. Brian Bergstrand , AIM: triryche206 PGP Key: If all else fails, lower your standards. As of 11:31:08 AM, iTunes is playing "Tristessa" from "Gish" by "Smashing Pumpkins" -----BEGIN PGP SIGNATURE----- Version: PGP 8.0.3 iQA/AwUBQMnQZHnR2Fu2x7aiEQK+QgCeJynMXuz9NsR+HBh+LDGKjdDT5SUAnAqc x2FZQ7uaURUzxOOTItxByl4D =5IRG -----END PGP SIGNATURE-----