From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756108AbbGFQwz (ORCPT ); Mon, 6 Jul 2015 12:52:55 -0400 Received: from linuxhacker.ru ([217.76.32.60]:53241 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754873AbbGFQt2 (ORCPT ); Mon, 6 Jul 2015 12:49:28 -0400 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Oleg Drokin Subject: [PATCH 10/20] staging/lustre/obdclass: move debug controls to sysfs Date: Mon, 6 Jul 2015 12:48:48 -0400 Message-Id: <1436201338-14263-11-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436201338-14263-1-git-send-email-green@linuxhacker.ru> References: <1436201338-14263-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oleg Drokin 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 --- .../lustre/lustre/obdclass/linux/linux-sysctl.c | 28 ++++++---------------- drivers/staging/lustre/sysfs-fs-lustre | 26 ++++++++++++++++++++ 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c index bb55a07..6af1cb2 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c @@ -135,30 +135,13 @@ 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, .maxlen = sizeof(int), @@ -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, }; diff --git a/drivers/staging/lustre/sysfs-fs-lustre b/drivers/staging/lustre/sysfs-fs-lustre index 38d1adc..ea9982b 100644 --- a/drivers/staging/lustre/sysfs-fs-lustre +++ b/drivers/staging/lustre/sysfs-fs-lustre @@ -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" +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" +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" +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/-/blocksize Date: May 2015 Contact: "Oleg Drokin" -- 2.1.0