}
LUSTRE_RW_ATTR(max_dirty_mb);
+LUSTRE_ATTR(ost_conn_uuid, 0444, conn_uuid_show, NULL);
LUSTRE_RO_ATTR(conn_uuid);
-LUSTRE_WO_ATTR(ping);
+LUSTRE_RW_ATTR(ping);
static int osc_cached_mb_seq_show(struct seq_file *m, void *v)
{
obd_kset.kobj);
struct client_obd *cli = &dev->u.cli;
struct ptlrpc_request *req;
+ unsigned int idle_debug = 0;
unsigned int val;
int rc;
- rc = kstrtouint(buffer, 10, &val);
- if (rc)
- return rc;
+ if (strncmp(buffer, "debug", 5) == 0) {
+ idle_debug = D_CONSOLE;
+ } else if (strncmp(buffer, "nodebug", 6) == 0) {
+ idle_debug = D_HA;
+ } else {
+ rc = kstrtouint(buffer, 10, &val);
+ if (rc)
+ return rc;
- if (val > CONNECTION_SWITCH_MAX)
- return -ERANGE;
+ if (val > CONNECTION_SWITCH_MAX)
+ return -ERANGE;
+ }
LPROCFS_CLIMP_CHECK(dev);
- cli->cl_import->imp_idle_timeout = val;
-
- /* to initiate the connection if it's in IDLE state */
- if (!val) {
- req = ptlrpc_request_alloc(cli->cl_import, &RQF_OST_STATFS);
- if (req != NULL)
- ptlrpc_req_finished(req);
+ if (idle_debug) {
+ cli->cl_import->imp_idle_debug = idle_debug;
+ } else {
+ if (!val) {
+ /* initiate the connection if it's in IDLE state */
+ req = ptlrpc_request_alloc(cli->cl_import,
+ &RQF_OST_STATFS);
+ if (req != NULL)
+ ptlrpc_req_finished(req);
+ }
+ cli->cl_import->imp_idle_timeout = val;
}
LPROCFS_CLIMP_EXIT(dev);
{ NULL }
};
-#define pct(a,b) (b ? a * 100 / b : 0)
-
static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
{
struct timespec64 now;
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),
unsigned long w = cli->cl_write_rpc_hist.oh_buckets[i];
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),
unsigned long w = cli->cl_write_offset_hist.oh_buckets[i];
read_cum += r;
write_cum += w;
- seq_printf(seq, "%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3lu\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));
+ 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));
if (read_cum == read_tot && write_cum == write_tot)
break;
}
return 0;
}
-#undef pct
static ssize_t osc_rpc_stats_seq_write(struct file *file,
const char __user *buf,
&lustre_attr_max_rpcs_in_flight.attr,
&lustre_attr_short_io_bytes.attr,
&lustre_attr_resend_count.attr,
+ &lustre_attr_ost_conn_uuid.attr,
&lustre_attr_conn_uuid.attr,
&lustre_attr_ping.attr,
&lustre_attr_idle_timeout.attr,