*/
void fld_cache_fini(struct fld_cache *cache)
{
- ENTRY;
-
- LASSERT(cache != NULL);
- fld_cache_flush(cache);
+ LASSERT(cache != NULL);
+ fld_cache_flush(cache);
- CDEBUG(D_INFO, "FLD cache statistics (%s):\n", cache->fci_name);
- CDEBUG(D_INFO, " Total reqs: %llu\n", cache->fci_stat.fst_count);
+ CDEBUG(D_INFO, "FLD cache statistics (%s):\n", cache->fci_name);
CDEBUG(D_INFO, " Cache reqs: %llu\n", cache->fci_stat.fst_cache);
- CDEBUG(D_INFO, " Cache hits: %u%%\n",
- pct(cache->fci_stat.fst_cache, cache->fci_stat.fst_count));
-
- OBD_FREE_PTR(cache);
+ CDEBUG(D_INFO, " Total reqs: %llu\n", cache->fci_stat.fst_count);
- EXIT;
+ OBD_FREE_PTR(cache);
}
/**
return len;
}
-#define pct(a, b) (b ? a * 100 / b : 0)
static int mdc_rpc_stats_seq_show(struct seq_file *seq, void *v)
{
struct obd_device *dev = seq->private;
read_cum += r;
write_cum += w;
- seq_printf(seq, "%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3lu\n",
+ seq_printf(seq, "%d:\t\t%10lu %3u %3u | %10lu %3u %3u\n",
1 << i, r, pct(r, read_tot),
pct(read_cum, read_tot), w,
pct(w, write_tot),
read_cum += r;
write_cum += w;
- seq_printf(seq, "%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3lu\n",
+ seq_printf(seq, "%d:\t\t%10lu %3u %3u | %10lu %3u %3u\n",
i, r, pct(r, read_tot), pct(read_cum, read_tot), w,
pct(w, write_tot), pct(write_cum, write_tot));
if (read_cum == read_tot && write_cum == write_tot)
read_cum += r;
write_cum += w;
- seq_printf(seq, "%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3lu\n",
+ seq_printf(seq, "%d:\t\t%10lu %3u %3u | %10lu %3u %3u\n",
(i == 0) ? 0 : 1 << (i - 1),
r, pct(r, read_tot), pct(read_cum, read_tot),
w, pct(w, write_tot), pct(write_cum, write_tot));
return 0;
}
-#undef pct
LPROC_SEQ_FOPS(mdc_rpc_stats);
static int mdc_stats_seq_show(struct seq_file *seq, void *v)