From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755024AbbGFQtc (ORCPT ); Mon, 6 Jul 2015 12:49:32 -0400 Received: from linuxhacker.ru ([217.76.32.60]:53220 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754739AbbGFQtX (ORCPT ); Mon, 6 Jul 2015 12:49:23 -0400 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Oleg Drokin Subject: [PATCH 06/20] staging/lustre: Remove now obsolete memory tracking sysctls Date: Mon, 6 Jul 2015 12:48:44 -0400 Message-Id: <1436201338-14263-7-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 In the past when Lustre did its own allocation amounts tracking the results were shown in sysctl as current and overall max number of bytes and pages allocated. Now that we don't track these, remove the sysctls. Signed-off-by: Oleg Drokin --- .../lustre/lustre/obdclass/linux/linux-sysctl.c | 124 --------------------- 1 file changed, 124 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c index b9a7d2f..e800bd6 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c @@ -66,102 +66,6 @@ static int proc_set_timeout(struct ctl_table *table, int write, return rc; } -static int proc_memory_alloc(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - char buf[22]; - int len; - - if (!*lenp || (*ppos && !write)) { - *lenp = 0; - return 0; - } - if (write) - return -EINVAL; - - len = snprintf(buf, sizeof(buf), "%llu\n", obd_memory_sum()); - if (len > *lenp) - len = *lenp; - buf[len] = '\0'; - if (copy_to_user(buffer, buf, len)) - return -EFAULT; - *lenp = len; - *ppos += *lenp; - return 0; -} - -static int proc_pages_alloc(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - char buf[22]; - int len; - - if (!*lenp || (*ppos && !write)) { - *lenp = 0; - return 0; - } - if (write) - return -EINVAL; - - len = snprintf(buf, sizeof(buf), "%llu\n", obd_pages_sum()); - if (len > *lenp) - len = *lenp; - buf[len] = '\0'; - if (copy_to_user(buffer, buf, len)) - return -EFAULT; - *lenp = len; - *ppos += *lenp; - return 0; -} - -static int proc_mem_max(struct ctl_table *table, int write, void __user *buffer, - size_t *lenp, loff_t *ppos) -{ - char buf[22]; - int len; - - if (!*lenp || (*ppos && !write)) { - *lenp = 0; - return 0; - } - if (write) - return -EINVAL; - - len = snprintf(buf, sizeof(buf), "%llu\n", obd_memory_max()); - if (len > *lenp) - len = *lenp; - buf[len] = '\0'; - if (copy_to_user(buffer, buf, len)) - return -EFAULT; - *lenp = len; - *ppos += *lenp; - return 0; -} - -static int proc_pages_max(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -{ - char buf[22]; - int len; - - if (!*lenp || (*ppos && !write)) { - *lenp = 0; - return 0; - } - if (write) - return -EINVAL; - - len = snprintf(buf, sizeof(buf), "%llu\n", obd_pages_max()); - if (len > *lenp) - len = *lenp; - buf[len] = '\0'; - if (copy_to_user(buffer, buf, len)) - return -EFAULT; - *lenp = len; - *ppos += *lenp; - return 0; -} - static int proc_max_dirty_pages_in_mb(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { @@ -233,34 +137,6 @@ static struct ctl_table obd_table[] = { .proc_handler = &proc_dointvec }, { - .procname = "memused", - .data = NULL, - .maxlen = 0, - .mode = 0444, - .proc_handler = &proc_memory_alloc - }, - { - .procname = "pagesused", - .data = NULL, - .maxlen = 0, - .mode = 0444, - .proc_handler = &proc_pages_alloc - }, - { - .procname = "memused_max", - .data = NULL, - .maxlen = 0, - .mode = 0444, - .proc_handler = &proc_mem_max - }, - { - .procname = "pagesused_max", - .data = NULL, - .maxlen = 0, - .mode = 0444, - .proc_handler = &proc_pages_max - }, - { .procname = "ldlm_timeout", .data = &ldlm_timeout, .maxlen = sizeof(int), -- 2.1.0