Home | History | Annotate | Download | only in raidframe

Lines Matching refs:info

78 	RF_DeclusteredConfigInfo_t *info;
91 info = RF_MallocAndAdd(sizeof(*info), raidPtr->cleanupList);
92 if (info == NULL)
94 layoutPtr->layoutSpecificInfo = (void *) info;
95 info->SpareTable = NULL;
99 (void)memcpy(info->sparemap_fname, cfgBuf, RF_SPAREMAP_NAME_LEN);
127 info->BlocksPerTable = b;
128 info->Lambda = lambda;
129 info->NumParityReps = info->groupSize = k;
130 info->SUsPerTable = b * (k - 1) * layoutPtr->SUsPerPU; /* b blks, k-1 SUs each */
131 info->SUsPerFullTable = k * info->SUsPerTable; /* rot k times */
132 info->PUsPerBlock = k - 1;
133 info->SUsPerBlock = info->PUsPerBlock * layoutPtr->SUsPerPU;
134 info->TableDepthInPUs = (b * k) / v;
135 info->FullTableDepthInPUs = info->TableDepthInPUs * k; /* k repetitions */
138 info->FullTablesPerSpareRegion = (v - 1) / rf_gcd(r, v - 1); /* (v-1)/gcd fulltables */
139 info->TablesPerSpareRegion = k * info->FullTablesPerSpareRegion;
140 info->SpareSpaceDepthPerRegionInSUs = (r * info->TablesPerSpareRegion / (v - 1)) * layoutPtr->SUsPerPU;
144 if (info->FullTableDepthInPUs * layoutPtr->SUsPerPU + info->SpareSpaceDepthPerRegionInSUs > layoutPtr->stripeUnitsPerDisk) {
146 (int) info->FullTableDepthInPUs,
147 (int) info->SpareSpaceDepthPerRegionInSUs,
152 if (info->TableDepthInPUs * layoutPtr->SUsPerPU > layoutPtr->stripeUnitsPerDisk) {
154 (int) (info->TableDepthInPUs * layoutPtr->SUsPerPU), \
166 spareRegionDepthInPUs = (info->TablesPerSpareRegion * info->TableDepthInPUs +
167 (info->TablesPerSpareRegion * info->TableDepthInPUs) / (v - 1));
168 info->SpareRegionDepthInSUs = spareRegionDepthInPUs * layoutPtr->SUsPerPU;
171 info->NumCompleteSRs = numCompleteSpareRegionsPerDisk;
179 extraPUsPerDisk -= (info->SpareSpaceDepthPerRegionInSUs / layoutPtr->SUsPerPU);
183 i = extraPUsPerDisk / info->TableDepthInPUs;
185 complete_FT_count = (numCompleteSpareRegionsPerDisk * (info->TablesPerSpareRegion / k) + i / k);
186 info->FullTableLimitSUID = complete_FT_count * info->SUsPerFullTable;
187 info->ExtraTablesPerDisk = i % k;
191 totSparePUsPerDisk = (numCompleteSpareRegionsPerDisk + 1) * (info->SpareSpaceDepthPerRegionInSUs / layoutPtr->SUsPerPU);
192 info->TotSparePUsPerDisk = totSparePUsPerDisk;
195 ((complete_FT_count) * info->FullTableDepthInPUs + /* data & parity space */
196 info->ExtraTablesPerDisk * info->TableDepthInPUs +
200 (complete_FT_count * info->FullTableDepthInPUs + info->ExtraTablesPerDisk * info->TableDepthInPUs)
206 layoutPtr->stripeUnitsPerDisk /= (info->TableDepthInPUs * layoutPtr->SUsPerPU);
207 layoutPtr->stripeUnitsPerDisk *= (info->TableDepthInPUs * layoutPtr->SUsPerPU);
212 ((layoutPtr->stripeUnitsPerDisk / layoutPtr->SUsPerPU) / info->FullTableDepthInPUs);
214 info->FullTableLimitSUID = complete_FT_count * info->SUsPerFullTable;
215 info->ExtraTablesPerDisk =
216 ((layoutPtr->stripeUnitsPerDisk / layoutPtr->SUsPerPU) / info->TableDepthInPUs) % k;
224 diskOffsetOfLastFullTableInSUs = numCompleteFullTablesPerDisk * info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
226 SpareSpaceInSUs = numCompleteSpareRegionsPerDisk * info->SpareSpaceDepthPerRegionInSUs;
228 info->DiskOffsetOfLastSpareSpaceChunkInSUs =
229 diskOffsetOfLastFullTableInSUs + info->ExtraTablesPerDisk * info->TableDepthInPUs * layoutPtr->SUsPerPU;
231 info->DiskOffsetOfLastFullTableInSUs = diskOffsetOfLastFullTableInSUs;
232 info->numCompleteFullTablesPerDisk = numCompleteFullTablesPerDisk;
235 info->LayoutTable = rf_make_2d_array(b, k, raidPtr->cleanupList);
236 if (info->LayoutTable == NULL)
238 info->OffsetTable = rf_make_2d_array(b, k, raidPtr->cleanupList);
239 if (info->OffsetTable == NULL)
241 info->BlockTable = rf_make_2d_array(info->TableDepthInPUs * layoutPtr->SUsPerPU, raidPtr->numCol, raidPtr->cleanupList);
242 if (info->BlockTable == NULL)
251 info->LayoutTable[i][j] = *cfgBuf++;
256 info->OffsetTable[i][j] = first_avail_slot[info->LayoutTable[i][j]];
257 first_avail_slot[info->LayoutTable[i][j]]++;
264 info->BlockTable[(info->OffsetTable[i][j] * layoutPtr->SUsPerPU) + l]
265 [info->LayoutTable[i][j]] = SUID;
275 raidPtr->totalSectors = (k * complete_FT_count + info->ExtraTablesPerDisk) *
276 info->SUsPerTable * layoutPtr->sectorsPerStripeUnit;
293 RF_DeclusteredConfigInfo_t *info;
297 info = (RF_DeclusteredConfigInfo_t *) raidPtr->Layout.layoutSpecificInfo;
298 if (info->SpareTable)
322 RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
326 RF_StripeCount_t sus_per_fulltable = info->SUsPerFullTable;
327 RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
336 SpareRegion = FullTableID / info->FullTablesPerSpareRegion;
337 SpareSpace = SpareRegion * info->SpareSpaceDepthPerRegionInSUs;
340 TableID = FullTableOffset / info->SUsPerTable;
341 TableOffset = FullTableOffset - TableID * info->SUsPerTable;
342 BlockID = TableOffset / info->PUsPerBlock;
343 BlockOffset = TableOffset - BlockID * info->PUsPerBlock;
344 BlockID %= info->BlocksPerTable;
345 RepIndex = info->PUsPerBlock - TableID;
348 *col = info->LayoutTable[BlockID][BlockOffset];
353 rf_remap_to_spare_space(layoutPtr, info, FullTableID, TableID, BlockID, (base_suid) ? 1 : 0, SpareRegion, col, &outSU);
359 outSU += TableID * info->TableDepthInPUs * layoutPtr->SUsPerPU; /* offs to strt of tble */
360 outSU += info->OffsetTable[BlockID][BlockOffset] * layoutPtr->SUsPerPU; /* offs to the PU */
362 outSU += TableOffset / (info->BlocksPerTable * info->PUsPerBlock); /* offs to the SU within
380 RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
384 RF_StripeCount_t sus_per_fulltable = info->SUsPerFullTable;
385 RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
394 SpareRegion = FullTableID / info->FullTablesPerSpareRegion;
395 SpareSpace = SpareRegion * info->SpareSpaceDepthPerRegionInSUs;
399 TableID = FullTableOffset / info->SUsPerTable;
400 TableOffset = FullTableOffset - TableID * info->SUsPerTable;
401 /* TableOffset = FullTableOffset % info->SUsPerTable; */
402 /* BlockID = (TableOffset / info->PUsPerBlock) %
403 * info->BlocksPerTable; */
404 BlockID = TableOffset / info->PUsPerBlock;
405 BlockID %= info->BlocksPerTable;
408 RepIndex = (raidPtr->noRotate) ? info->PUsPerBlock : info->PUsPerBlock - TableID;
409 *col = info->LayoutTable[BlockID][RepIndex];
413 rf_remap_to_spare_space(layoutPtr, info, FullTableID, TableID, BlockID, (base_suid) ? 1 : 0, SpareRegion, col, &outSU);
421 outSU += TableID * info->TableDepthInPUs * layoutPtr->SUsPerPU;
422 outSU += info->OffsetTable[BlockID][RepIndex] * layoutPtr->SUsPerPU;
425 outSU += TableOffset / (info->BlocksPerTable * info->PUsPerBlock);
438 RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
439 RF_StripeCount_t sus_per_fulltable = info->SUsPerFullTable;
440 RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
449 tableOffset = (stripeID % info->BlocksPerTable); /* find offset into
451 *diskids = info->LayoutTable[tableOffset];
479 RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) raidPtr->Layout.layoutSpecificInfo;
481 return (info->Lambda * raidPtr->numFloatingReconBufs / info->TableDepthInPUs / rf_numBufsToAccumulate);
516 RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
518 if (*SUID >= info->FullTableLimitSUID) {
520 *sus_per_fulltable = info->ExtraTablesPerDisk * info->SUsPerTable;
523 *fulltable_depth = info->ExtraTablesPerDisk * info->TableDepthInPUs * layoutPtr->SUsPerPU;
526 *base_suid = info->DiskOffsetOfLastFullTableInSUs;
530 *SUID -= info->FullTableLimitSUID;
543 RF_DeclusteredConfigInfo_t *info;
545 info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
547 *psID = (stripeID / (layoutPtr->SUsPerPU * info->BlocksPerTable))
548 * info->BlocksPerTable + (stripeID % info->BlocksPerTable);
549 *which_ru = (stripeID % (info->BlocksPerTable * layoutPtr->SUsPerPU))
550 / info->BlocksPerTable;
559 RF_DeclusteredConfigInfo_t *info,
583 lastSROffset = info->NumCompleteSRs * info->SpareRegionDepthInSUs;
584 which_ft = (info->DiskOffsetOfLastFullTableInSUs - lastSROffset) / (info->FullTableDepthInPUs * layoutPtr->SUsPerPU);
587 ftID = info->DiskOffsetOfLastFullTableInSUs / (info->FullTableDepthInPUs * layoutPtr->SUsPerPU) + which_ft;
588 SpareRegion = info->NumCompleteSRs;
590 TableInSpareRegion = (ftID * info->NumParityReps + TableID) % info->TablesPerSpareRegion;
592 *outCol = info->SpareTable[TableInSpareRegion][BlockID].spareDisk;
595 spareTableStartSU = (SpareRegion == info->NumCompleteSRs) ?
596 info->DiskOffsetOfLastFullTableInSUs + info->ExtraTablesPerDisk * info->TableDepthInPUs * layoutPtr->SUsPerPU :
597 (SpareRegion + 1) * info->SpareRegionDepthInSUs - info->SpareSpaceDepthPerRegionInSUs;
598 *outSU = spareTableStartSU + info->SpareTable[TableInSpareRegion][BlockID].spareBlockOffsetInSUs;
610 RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) raidPtr->Layout.layoutSpecificInfo;
619 req->TablesPerSpareRegion = info->TablesPerSpareRegion;
620 req->BlocksPerTable = info->BlocksPerTable;
621 req->TableDepthInPUs = info->TableDepthInPUs;
622 req->SpareSpaceDepthPerRegionInSUs = info->SpareSpaceDepthPerRegionInSUs;
637 RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) raidPtr->Layout.layoutSpecificInfo;
643 size_t ptrslen = info->TablesPerSpareRegion * sizeof(*ptrs);
651 info->SpareTable = RF_Malloc(info->TablesPerSpareRegion *
652 sizeof(*info->SpareTable));
656 size_t len = info->BlocksPerTable * sizeof(**info->SpareTable);
657 for (i = 0; i < info->TablesPerSpareRegion; i++) {
658 info->SpareTable[i] = RF_Malloc(len);
659 retcode = copyin(ptrs[i], info->SpareTable[i], len);
661 info->SpareTable = NULL; /* blow off the memory
687 RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
688 RF_SpareTableEntry_t **table = info->SpareTable;
690 for (i = 0; i < info->TablesPerSpareRegion; i++) {
691 RF_Free(table[i], info->BlocksPerTable * sizeof(RF_SpareTableEntry_t));
693 RF_Free(table, info->TablesPerSpareRegion * sizeof(RF_SpareTableEntry_t *));
694 info->SpareTable = NULL;