Date: Thu, 10 Jun 2004 20:13:29 -0500 From: Brian Bergstrand <brian@classicalguitar.net> To: fs@freebsd.org Subject: Ext2 vs UFS getlbns Message-ID: <8C40210D-BB44-11D8-B357-0003930A674E@classicalguitar.net>
next in thread | raw e-mail | index | archive | help
-----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 <http://www.bergstrand.org/brian/>, AIM: triryche206 PGP Key: <http://www.bergstrand.org/brian/misc/public_key.txt> 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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8C40210D-BB44-11D8-B357-0003930A674E>