@@ -462,7 +462,8 @@ int lprocfs_wr_uint(struct file *file, const char __user *buffer,
struct adaptive_timeout;
int lprocfs_at_hist_helper(struct seq_file *m, struct adaptive_timeout *at);
int lprocfs_rd_timeouts(struct seq_file *m, void *data);
-
+ssize_t ping_store(struct kobject *kobj, struct attribute *attr,
+ const char *buffer, size_t count);
ssize_t ping_show(struct kobject *kobj, struct attribute *attr,
char *buffer);
@@ -306,7 +306,7 @@ static ssize_t max_mod_rpcs_in_flight_store(struct kobject *kobj,
LUSTRE_ATTR(mds_conn_uuid, 0444, conn_uuid_show, NULL);
LUSTRE_RO_ATTR(conn_uuid);
-LUSTRE_RO_ATTR(ping);
+LUSTRE_RW_ATTR(ping);
static ssize_t mdc_rpc_stats_seq_write(struct file *file,
const char __user *buf,
@@ -69,7 +69,7 @@ struct lprocfs_vars lprocfs_mgc_obd_vars[] = {
LUSTRE_ATTR(mgs_conn_uuid, 0444, conn_uuid_show, NULL);
LUSTRE_RO_ATTR(conn_uuid);
-LUSTRE_RO_ATTR(ping);
+LUSTRE_RW_ATTR(ping);
static struct attribute *mgc_attrs[] = {
&lustre_attr_mgs_conn_uuid.attr,
@@ -176,7 +176,7 @@ static ssize_t max_dirty_mb_store(struct kobject *kobj,
LUSTRE_ATTR(ost_conn_uuid, 0444, conn_uuid_show, NULL);
LUSTRE_RO_ATTR(conn_uuid);
-LUSTRE_RO_ATTR(ping);
+LUSTRE_RW_ATTR(ping);
static int osc_cached_mb_seq_show(struct seq_file *m, void *v)
{
@@ -1234,6 +1234,7 @@ void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd)
}
EXPORT_SYMBOL(ptlrpc_lprocfs_unregister_obd);
+/* Kept for older tools */
ssize_t ping_show(struct kobject *kobj, struct attribute *attr,
char *buffer)
{
@@ -1260,6 +1261,14 @@ ssize_t ping_show(struct kobject *kobj, struct attribute *attr,
}
EXPORT_SYMBOL(ping_show);
+ssize_t ping_store(struct kobject *kobj, struct attribute *attr,
+ const char *buffer, size_t count)
+{
+ return ping_show(kobj, attr, (char *)buffer);
+}
+EXPORT_SYMBOL(ping_store);
+
+
#undef BUFLEN
/* Write the connection UUID to this file to attempt to connect to that node.