Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: Recent netbsd-5 changes seem to make (autoconfig) raidframe trouble



going from the info in y our sd1e component label, i found the following.
christos, can you poke around in rf_AutoConfigureDisks() since you seem to
have this problem too?

the code is:

        raidPtr->totalSectors = layoutPtr->stripeUnitsPerDisk * 
(raidPtr->numCol / 2) * layoutPtr->sectorsPerStripeUnit;

but stripeUnitsPerDisk isn't displayed.  however, it is calculated
from disaplyed values:

        layoutPtr->stripeUnitsPerDisk = raidPtr->sectorsPerDisk / 
layoutPtr->sectorsPerStripeUnit;

we kow that sectorsPerStripeUnit = 32, from your component label for
sd0e:

>    sectPerSU: 32, SUsPerPU: 1, SUsPerRU: 1

but what about sectorsPerDisk?  in the function that uses it above,
it is re-set again 17 lines later to:

        raidPtr->sectorsPerDisk = layoutPtr->stripeUnitsPerDisk * 
layoutPtr->sectorsPerStripeUnit;

oh, i see where the massive numbers are coming from:

int
rf_AutoConfigureDisks(RF_Raid_t *raidPtr, RF_Config_t *cfgPtr,
                      RF_AutoConfig_t *auto_config)
{
...
        RF_SectorCount_t min_numblks = (RF_SectorCount_t) 0x7FFFFFFFFFFFLL;
... lots of code here ...
        raidPtr->sectorsPerDisk = min_numblks;

if the lots of code doesn't set it, then sectorsPerDisk will be wrong.
i am guesing that is what happens here.


thanks.


.mrg.


Home | Main Index | Thread Index | Old Index