Subject: Re: Supporting sector size != DEV_BSIZE
To: Greywolf <greywolf@starwolf.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/05/2002 08:26:46
On Tue, 4 Jun 2002, Greywolf wrote:

> On Tue, 4 Jun 2002, Trevin Beattie wrote:
>
> # 	/* convert to disk blocks */
> # 	blk = fsbtodb(fs, blk);
> # 	nblk = fs->fs_bsize / DEV_BSIZE;
> #
> # Now, fsbtodb, as originally written, converts file system frags to physical
> # sectors.  So the first assignment yields a sector number, but the second
> # assignment yields a DEV_BSIZE count!  This is certainly wrong.
>
> I think you don't see what it's doing up there.
>
> fsbtodb converts filesystem _blocks_ to physical sectors, not frags.

Yes, and at this level of the code, a file system block is a fragment.
i.e. on an 8k/1k ffs, dbtofsb() converts to the 1k things, not the 8k
things.

Take care,

Bill