staging/lustre/obdclass: move debug controls to sysfs
authorOleg Drokin <green@linuxhacker.ru>
Mon, 6 Jul 2015 16:48:48 +0000 (12:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jul 2015 02:47:20 +0000 (19:47 -0700)
debug_peer_on_timeout, dump_on_timeout and dump_on_eviction
controls from /proc/sys/lustre to /sys/fs/lustre

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
drivers/staging/lustre/sysfs-fs-lustre

index bb55a07b6c511b0c17e88fdbb9b75399aff0fbc0..6af1cb2cb38670f04d2d2bd4595fc6995db8a2c6 100644 (file)
@@ -135,29 +135,12 @@ static ssize_t max_dirty_mb_store(struct kobject *kobj, struct attribute *attr,
 }
 LUSTRE_RW_ATTR(max_dirty_mb);
 
+LUSTRE_STATIC_UINT_ATTR(debug_peer_on_timeout, &obd_debug_peer_on_timeout);
+LUSTRE_STATIC_UINT_ATTR(dump_on_timeout, &obd_dump_on_timeout);
+LUSTRE_STATIC_UINT_ATTR(dump_on_eviction, &obd_dump_on_eviction);
+
 #ifdef CONFIG_SYSCTL
 static struct ctl_table obd_table[] = {
-       {
-               .procname = "debug_peer_on_timeout",
-               .data     = &obd_debug_peer_on_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .procname = "dump_on_timeout",
-               .data     = &obd_dump_on_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .procname = "dump_on_eviction",
-               .data     = &obd_dump_on_eviction,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
        {
                .procname = "at_min",
                .data     = &at_min,
@@ -211,6 +194,9 @@ static struct ctl_table parent_table[] = {
 static struct attribute *lustre_attrs[] = {
        &lustre_sattr_timeout.u.attr,
        &lustre_attr_max_dirty_mb.attr,
+       &lustre_sattr_debug_peer_on_timeout.u.attr,
+       &lustre_sattr_dump_on_timeout.u.attr,
+       &lustre_sattr_dump_on_eviction.u.attr,
        NULL,
 };
 
index 38d1adcd233517700b02f5b5101d1ed577bd2c5f..ea9982bae85d2835c0a1da15cb0ed1832bd8cf62 100644 (file)
@@ -64,6 +64,32 @@ Description:
                find some pages to free/writeout.
                Default 1/2 RAM. Min value 4, max value 9/10 of RAM.
 
+What:          /sys/fs/lustre/debug_peer_on_timeout
+Date:          June 2015
+Contact:       "Oleg Drokin" <oleg.drokin@intel.com>
+Description:
+               Control if lnet debug information should be printed when
+               an RPC timeout occurs.
+               0 disabled (default)
+               1 enabled
+
+What:          /sys/fs/lustre/dump_on_timeout
+Date:          June 2015
+Contact:       "Oleg Drokin" <oleg.drokin@intel.com>
+Description:
+               Controls if Lustre debug log should be dumped when an RPC
+               timeout occurs. This is useful if yout debug buffer typically
+               rolls over by the time you notice RPC timeouts.
+
+What:          /sys/fs/lustre/dump_on_eviction
+Date:          June 2015
+Contact:       "Oleg Drokin" <oleg.drokin@intel.com>
+Description:
+               Controls if Lustre debug log should be dumped when an this
+               client is evicted from one of the servers.
+               This is useful if yout debug buffer typically rolls over
+                by the time you notice the eviction event.
+
 What:          /sys/fs/lustre/llite/<fsname>-<uuid>/blocksize
 Date:          May 2015
 Contact:       "Oleg Drokin" <oleg.drokin@intel.com>