Subject: Re: how to deftopt, was The demise of DEV_BSIZE
To: Ross Harvey <>
From: Bill Studenmund <>
List: tech-kern
Date: 10/07/1999 13:04:55
On Thu, 7 Oct 1999, Ross Harvey wrote:

> OK, I misundertood the latest proposoal: to have the option off by default,
> but by including in generic a defopt that removes the extra code, rather
> than by NOT including a defopt that selected arbitrary sector sizing.
> I suppose that's better, but it still seems strange. I would think that
> the option should add the feature, not remove it, especially for this case
> of an exotic and rarely-if-ever-used feature.

It's not really that big a deal. It just struk me that we will always want
lkm's to use it, and it seemed rather minimalist to say

#ifdef PO2_ONLY 	/* or whatever we name it - my names suck */
#define	btodb(x, sh)	((x) >> (sh))
#define btodb(x, sh)	((sh >= 0) ? ((x) >> (sh)) : ((x) / (-sh))
#endif	/* PO2_ONLY */

That way the right thing just happens with one test. But

#if defined(NON_PO2) || defined(LKM) works too.


Take care,