Date: Fri, 11 Jun 2004 11:31:47 -0500 From: Brian Bergstrand <brian@classicalguitar.net> To: fs@freebsd.org Subject: Ext2 vs UFS getlbns Message-ID: <D517B455-BBC4-11D8-8C2A-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 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 <http://www.bergstrand.org/brian/>, AIM: triryche206 PGP Key: <http://www.bergstrand.org/brian/misc/public_key.txt> 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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D517B455-BBC4-11D8-8C2A-0003930A674E>