}
LUSTRE_RW_ATTR(contention_seconds);
+LUSTRE_ATTR(mds_conn_uuid, 0444, conn_uuid_show, NULL);
LUSTRE_RO_ATTR(conn_uuid);
-LUSTRE_WO_ATTR(ping);
+LUSTRE_RW_ATTR(ping);
static int mdc_cached_mb_seq_show(struct seq_file *m, void *v)
{
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)
&lustre_attr_max_rpcs_in_flight.attr,
&lustre_attr_max_mod_rpcs_in_flight.attr,
&lustre_attr_contention_seconds.attr,
+ &lustre_attr_mds_conn_uuid.attr,
&lustre_attr_conn_uuid.attr,
&lustre_attr_ping.attr,
NULL,