Subject: Re: Supporting sector size != DEV_BSIZE
To: None <tech-kern@netbsd.org>
From: Trevin Beattie <trevin@xmission.com>
List: tech-kern
Date: 06/04/2002 15:35:09
Totally confusing:

sys/ufs/ffs/ffs_balloc.c:441 reads:
	nb = fsbtodb(fs, cgtod(fs, dtog(fs, bp->b_blkno)));
nb is a logical (DEV_BSIZE) block number to be passed to getblk().
fsbtodb converts a frag number to a logical block number.
cgtod returns the frag number of a cylinder group block.
dtog converts a frag number to a cylinder group number.
b_blkno is a logical block number.

WHY is b_blkno passed directly to dtog()??  Does this section of code
actually work as written?  (It's in the 'fail'/unwind section of
ffs_balloc().)  Am I mistaken in understanding what the macros do?  (After
all, I only know what I read in the code comments.)

-----------------------
Trevin Beattie          "Do not meddle in the affairs of wizards,
trevin@xmission.com     for you are crunchy and good with ketchup."
      {:->                                     --unknown