Print this page
patch tsoome-feedback


 245                     cpu->cpuid, cpu->cpu_nretries);
 246                 cma_stats.cpu_flts.fmds_value.ui64++;
 247 
 248                 if (cpu->cpu_uuid != NULL)
 249                         fmd_case_uuclose(hdl, cpu->cpu_uuid);
 250                 return (1); /* success */
 251         }
 252 
 253         if (rc == -1) {
 254                 fmd_hdl_debug(hdl, "failed to retry cpu %u\n", cpu->cpuid);
 255                 cma_stats.page_fails.fmds_value.ui64++;
 256                 return (1); /* give up */
 257         }
 258 
 259         return (0);
 260 }
 261 
 262 static void
 263 cma_cpu_free(fmd_hdl_t *hdl, cma_cpu_t *cpu)
 264 {
 265         if (cpu->cpu_fmri != NULL)
 266                 nvlist_free(cpu->cpu_fmri);
 267         if (cpu->cpu_uuid != NULL)
 268                 fmd_hdl_strfree(hdl, cpu->cpu_uuid);
 269         fmd_hdl_free(hdl, cpu, sizeof (cma_cpu_t));
 270 }
 271 
 272 void
 273 cma_cpu_retry(fmd_hdl_t *hdl)
 274 {
 275         cma_cpu_t **cpup;
 276 
 277         fmd_hdl_debug(hdl, "cma_cpu_retry: timer fired\n");
 278 
 279         cma.cma_cpu_timerid = 0;
 280 
 281         cpup = &cma.cma_cpus;
 282         while (*cpup != NULL) {
 283                 cma_cpu_t *cpu = *cpup;
 284 
 285                 if (cpu_retry(hdl, cpu)) {




 245                     cpu->cpuid, cpu->cpu_nretries);
 246                 cma_stats.cpu_flts.fmds_value.ui64++;
 247 
 248                 if (cpu->cpu_uuid != NULL)
 249                         fmd_case_uuclose(hdl, cpu->cpu_uuid);
 250                 return (1); /* success */
 251         }
 252 
 253         if (rc == -1) {
 254                 fmd_hdl_debug(hdl, "failed to retry cpu %u\n", cpu->cpuid);
 255                 cma_stats.page_fails.fmds_value.ui64++;
 256                 return (1); /* give up */
 257         }
 258 
 259         return (0);
 260 }
 261 
 262 static void
 263 cma_cpu_free(fmd_hdl_t *hdl, cma_cpu_t *cpu)
 264 {

 265         nvlist_free(cpu->cpu_fmri);
 266         if (cpu->cpu_uuid != NULL)
 267                 fmd_hdl_strfree(hdl, cpu->cpu_uuid);
 268         fmd_hdl_free(hdl, cpu, sizeof (cma_cpu_t));
 269 }
 270 
 271 void
 272 cma_cpu_retry(fmd_hdl_t *hdl)
 273 {
 274         cma_cpu_t **cpup;
 275 
 276         fmd_hdl_debug(hdl, "cma_cpu_retry: timer fired\n");
 277 
 278         cma.cma_cpu_timerid = 0;
 279 
 280         cpup = &cma.cma_cpus;
 281         while (*cpup != NULL) {
 282                 cma_cpu_t *cpu = *cpup;
 283 
 284                 if (cpu_retry(hdl, cpu)) {