From owner-freebsd-fs@FreeBSD.ORG Fri Jun 11 19:33:36 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 E727616A4D0 for ; Fri, 11 Jun 2004 19:33:36 +0000 (GMT) Received: from liquidsky.homeunix.org (12-217-90-214.client.mchsi.com [12.217.90.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7980543D46 for ; Fri, 11 Jun 2004 19:33:36 +0000 (GMT) (envelope-from brian@classicalguitar.net) Received: from [127.0.0.1] (localhost [127.0.0.1]) by postfix.bergstrand.org (Postfix) with ESMTP id C553A39C13 for ; Thu, 10 Jun 2004 20:13:35 -0500 (CDT) Mime-Version: 1.0 (Apple Message framework v618) Content-Transfer-Encoding: 7bit Message-Id: <8C40210D-BB44-11D8-B357-0003930A674E@classicalguitar.net> Content-Type: text/plain; charset=US-ASCII; format=fixed To: fs@freebsd.org From: Brian Bergstrand Date: Thu, 10 Jun 2004 20:13:29 -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 19:33:37 -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 calculated AFTER the offset in Ext2 and BEFORE the offset in UFS. Was this change in Ext2 done on purpose for some reason, or does it not make a difference? I would think with some block block #'s it would. Thanks. Brian Bergstrand , AIM: triryche206 PGP Key: Hell, there are no rules here--we're trying to accomplish something. - Thomas A. Edison As of 07:50:41 PM, iTunes is playing "Bouncing Around The Room" from "Lawn Boy" by "Phish" -----BEGIN PGP SIGNATURE----- Version: PGP 8.0.3 iQA/AwUBQMj5L3nR2Fu2x7aiEQJJPACePBqrrfWVXW+VJjx5ucfo+WPJ7+oAoODa v40zOqo1FAmMVcgL2NSAoMsL =jtnG -----END PGP SIGNATURE-----