Lines Matching defs:listp

302 	hotfilelist_t  *listp;
366 MALLOC(listp, hotfilelist_t *, size, M_TEMP, M_WAITOK);
367 if (listp == NULL) {
374 bzero(listp, size);
376 hf_getsortedlist(hotdata, listp); /* NOTE: destroys hot file tree! */
378 listp->hfl_duration = tv.tv_sec - hfsmp->hfc_timebase;
379 hfsmp->hfc_recdata = listp;
394 if (listp->hfl_totalblocks > hfsmp->hfs_hotfile_freeblks) {
395 listp->hfl_reclaimblks =
396 MIN(listp->hfl_totalblocks, hfsmp->hfs_hotfile_maxblks) -
399 printf("hfs_recording_stop: need to reclaim %d blocks\n", listp->hfl_reclaimblks);
401 if (listp->hfl_reclaimblks)
409 if (newstage == HFC_ADOPTION && listp->hfl_totalblocks == 0) {
959 hotfilelist_t *listp;
967 if ((listp = (hotfilelist_t *)hfsmp->hfc_recdata) == NULL)
994 for (i = 0; i < listp->hfl_count; ++i) {
1000 key->fileID = listp->hfl_hotfile[i].hf_fileid;
1012 &listp->hfl_hotfile[i].hf_temperature);
1023 key->fileID = listp->hfl_hotfile[i].hf_fileid;
1035 key->temperature = listp->hfl_hotfile[i].hf_temperature;
1036 key->fileID = listp->hfl_hotfile[i].hf_fileid;
1048 listp->hfl_hotfile[i].hf_temperature = 0;
1049 listp->hfl_totalblocks -= listp->hfl_hotfile[i].hf_blocks;
1075 hotfilelist_t *listp;
1087 if ((listp = (hotfilelist_t *)hfsmp->hfc_recdata) == NULL)
1107 last = listp->hfl_next + HFC_FILESPERSYNC;
1108 if (last > listp->hfl_count)
1109 last = listp->hfl_count;
1121 for (i = listp->hfl_next; (i < last) && (blksmoved < HFC_BLKSPERSYNC); ++i) {
1125 if (listp->hfl_hotfile[i].hf_temperature == 0) {
1126 listp->hfl_next++;
1132 error = hfs_vget(hfsmp, listp->hfl_hotfile[i].hf_fileid, &vp, 0, 0);
1136 listp->hfl_next++;
1142 printf("hfs: hotfiles_adopt: huh, not a file %d (%d)\n", listp->hfl_hotfile[i].hf_fileid, VTOC(vp)->c_cnid);
1145 listp->hfl_hotfile[i].hf_temperature = 0;
1146 listp->hfl_next++;
1152 listp->hfl_hotfile[i].hf_temperature = 0;
1153 listp->hfl_next++;
1154 listp->hfl_totalblocks -= listp->hfl_hotfile[i].hf_blocks;
1161 listp->hfl_next++;
1162 listp->hfl_totalblocks -= fileblocks;
1182 listp->hfl_next++;
1187 listp->hfl_totalblocks -= fileblocks;
1191 key->temperature = listp->hfl_hotfile[i].hf_temperature;
1192 key->fileID = listp->hfl_hotfile[i].hf_fileid;
1213 key->fileID = listp->hfl_hotfile[i].hf_fileid;
1215 data = listp->hfl_hotfile[i].hf_temperature;
1232 listp->hfl_next++;
1233 if (listp->hfl_next >= listp->hfl_count) {
1245 printf("hfs: hotfiles_adopt: [%d] adopted %d blocks (%d left)\n", listp->hfl_next, blksmoved, listp->hfl_totalblocks);
1255 if ((listp->hfl_next >= listp->hfl_count) || (hfsmp->hfs_hotfile_freeblks <= 0)) {
1257 printf("hfs: hotfiles_adopt: all done relocating %d files\n", listp->hfl_count);
1285 hotfilelist_t *listp;
1299 if ((listp = (hotfilelist_t *)hfsmp->hfc_recdata) == NULL)
1323 while (listp->hfl_reclaimblks > 0 &&
1412 listp->hfl_reclaimblks -= fileblocks;
1413 if (listp->hfl_reclaimblks < 0)
1414 listp->hfl_reclaimblks = 0;
1450 printf("hfs: hotfiles_evict: moved %d files (%d blks, %d to go)\n", filesmoved, blksmoved, listp->hfl_reclaimblks);
1463 if (listp->hfl_reclaimblks <= 0) {