Subject: Re: Supporting sector size != DEV_BSIZE on lfs
To: Konrad Schroder <perseant@hhhh.org>
From: Trevin Beattie <trevin@xmission.com>
List: tech-kern
Date: 06/19/2002 15:36:42
At 02:44 PM 6/19/2002 -0700, Konrad Schroder wrote:
> lfs_blktodb converts between bsize and d_secsize;
> lfs_fbshift converts between bsize and fsize;
> lfs_fsbtodb converts between fsb and d_secsize.
>
>"fsb" is the unit that ufs_daddr_ts count; in v1 it is sectors, in v2
>it is fragments; so on LFSv2 filesystems it doesn't do anything but on v1
>it does.
Wait... I just plugged this in:
sectors blocks frags-or-sectors
------- * ------ * ----------------
blocks frags sectors
So you're saying that in v1, lfs_fsbtodb is zero; while in v2, lfs_fsbtodb
== lfs_blktodb - lfs_fbshift. So the whole purpose of fragstofsb() is to
cancel out the effect of (lfs_blktodb - lfs_fbshift)? Can I put that in a
code comment?
-----------------------
Trevin Beattie "Do not meddle in the affairs of wizards,
trevin@xmission.com for you are crunchy and good with ketchup."
{:-> --unknown