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



On Nov 23,  6:20am, mrg%eterna.com.au@localhost (matthew green) wrote:
-- Subject: re: Recent netbsd-5 changes seem to make (autoconfig) raidframe t

| 
| 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.

If you send me a patch with the printfs you want me to run, I will.
Although our cases are a bit different. His is raid-autoconfig, and mine
isn't that's why his fails and mine works. I think that the raid-autoconfig
trusts the disklabel instead of the raid label, where the other code is the
other way around?

christos


Home | Main Index | Thread Index | Old Index