Subject: Re: Supporting sector size != DEV_BSIZE
To: None <tech-kern@netbsd.org>
From: Trevin Beattie <trevin@xmission.com>
List: tech-kern
Date: 06/07/2002 15:52:43
I've been poring over the mkfs.c code to make sure there are no references
to DEV_BSIZE (as that value is not stored on disk), and I came across the
following at line 899:

	node.di_blocks = btodb(fragroundup(&sblock, node.di_size));

A quick grep through the ffs code confirmed that di_blocks is assumed to be
in units of DEV_BSIZE.  This may cause problems if, as Bill has suggested,
a drive is transferred to another system where the kernel's value of
DEV_BSIZE is different.  Am I mistaken, or does anyone have a suggestion on
how to fix it without breaking existing implementations?  Why doesn't
di_blocks simply count the number of fragments?

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