public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: green@linuxhacker.ru
Cc: devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 18/20] staging/lustre/libcfs: get rid of debugfs/lnet/debug_mb
Date: Mon, 13 Jul 2015 19:49:25 -0700	[thread overview]
Message-ID: <20150714024925.GA16946@kroah.com> (raw)
In-Reply-To: <1436201338-14263-19-git-send-email-green@linuxhacker.ru>

On Mon, Jul 06, 2015 at 12:48:56PM -0400, green@linuxhacker.ru wrote:
> From: Oleg Drokin <green@linuxhacker.ru>
> 
> It's just a fancy libcfs_debug_mb module parameter wrapper,
> so just add debug buffer size check and resizing and the same
> functionality now would be accessible via
> /sys/module/libcfs/parameters/libcfs_debug_mb
> 
> Also add a symlink for backwards compatibility.
> 
> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
> ---
>  drivers/staging/lustre/lustre/libcfs/debug.c     | 37 ++++++++++++++++++++++--
>  drivers/staging/lustre/lustre/libcfs/module.c    | 32 ++------------------
>  drivers/staging/lustre/lustre/libcfs/tracefile.c | 12 --------
>  drivers/staging/lustre/lustre/libcfs/tracefile.h |  1 -
>  4 files changed, 37 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c
> index 5ae7b65..e4c7129 100644
> --- a/drivers/staging/lustre/lustre/libcfs/debug.c
> +++ b/drivers/staging/lustre/lustre/libcfs/debug.c
> @@ -57,8 +57,39 @@ module_param(libcfs_debug, int, 0644);
>  MODULE_PARM_DESC(libcfs_debug, "Lustre kernel debug mask");
>  EXPORT_SYMBOL(libcfs_debug);
>  
> +static int libcfs_param_debug_mb_set(const char *val,
> +				     const struct kernel_param *kp)
> +{
> +	int rc;
> +	unsigned num;
> +
> +	rc = kstrtouint(val, 0, &num);
> +	if (rc == -EINVAL)
> +		return -EINVAL;
> +
> +	if (!*((unsigned int *)kp->arg)) {
> +		*((unsigned int *)kp->arg) = num;
> +		return 0;
> +	}
> +
> +	rc = cfs_trace_set_debug_mb(num);
> +
> +	if (!rc)
> +		*((unsigned int *)kp->arg) = cfs_trace_get_debug_mb();
> +
> +	return rc;
> +}
> +
> +static struct kernel_param_ops param_ops_debugmb = {
> +	.set = libcfs_param_debug_mb_set,
> +	.get = param_get_uint,
> +};
> +
> +#define param_check_debugmb(name, p) \
> +		__param_check(name, p, unsigned int)
> +
>  static unsigned int libcfs_debug_mb;
> -module_param(libcfs_debug_mb, uint, 0644);
> +module_param(libcfs_debug_mb, debugmb, 0644);

I'll stop here in the patch series, please fix this up and resend the
remaining 3.

thanks,

greg k-h

  parent reply	other threads:[~2015-07-14  2:49 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 16:48 [PATCH 00/20] Lustre: final procfs bits removal green
2015-07-06 16:48 ` [PATCH 01/20] staging/lustre/lov: Move target sysfs symlink removal to object freeing green
2015-07-06 16:48 ` [PATCH 02/20] staging/lustre: make ldebugfs_remove recursive green
2015-07-06 16:48 ` [PATCH 03/20] staging/lustre/ldlm: In ldlm_pools_fini make sure there was init first green
2015-07-06 16:48 ` [PATCH 04/20] staging/lustre/obdclass: fix class_procfs_init error return value green
2015-07-06 16:48 ` [PATCH 05/20] staging/lustre: remove alloc_fail_rate sysctl green
2015-07-06 16:48 ` [PATCH 06/20] staging/lustre: Remove now obsolete memory tracking sysctls green
2015-07-06 16:48 ` [PATCH 07/20] staging/lustre: Remove unneeded ldlm_timeout control green
2015-07-06 16:48 ` [PATCH 08/20] staging/lustre/obdclass: move sysctl timeout to sysfs green
2015-07-06 16:48 ` [PATCH 09/20] staging/lustre/obdclass: move max_dirty_mb from sysctl " green
2015-07-06 16:48 ` [PATCH 10/20] staging/lustre/obdclass: move debug controls " green
2015-07-06 16:48 ` [PATCH 11/20] staging/lustre/obdclass: Move AT controls from sysctl " green
2015-07-06 16:48 ` [PATCH 12/20] staging/lustre: Get rid of remaining /proc/sys/lustre plumbing green
2015-07-06 16:48 ` [PATCH 13/20] staging/lustre/libcfs: move /proc/sys/lnet to debugfs green
2015-07-06 16:48 ` [PATCH 14/20] staging/lustre/libcfs: Remove redundant lnet debugfs variables green
2015-07-06 16:48 ` [PATCH 15/20] staging/lustre/libcfs: get rid of debugfs/lnet/console_backoff green
2015-07-08  8:28   ` Dan Carpenter
2015-07-08  8:30     ` Dan Carpenter
2015-07-08 13:43     ` Oleg Drokin
2015-07-06 16:48 ` [PATCH 16/20] staging/lustre/libcfs: Remove redundant enums and sysctl moduleparams green
2015-07-06 16:48 ` [PATCH 17/20] staging/lustre/libcfs: Remove unneeded lnet watchdog_ratelimit sysctl green
2015-07-06 16:48 ` [PATCH 18/20] staging/lustre/libcfs: get rid of debugfs/lnet/debug_mb green
2015-07-08  8:45   ` Dan Carpenter
2015-07-14  2:43     ` Greg Kroah-Hartman
2015-07-14  2:45       ` Oleg Drokin
2015-07-14  3:04         ` Greg Kroah-Hartman
2015-07-14  2:46   ` Greg Kroah-Hartman
2015-07-14  2:51     ` Oleg Drokin
2015-07-14  3:52       ` Greg Kroah-Hartman
2015-07-14  2:49   ` Greg Kroah-Hartman [this message]
2015-07-14  2:52     ` Oleg Drokin
2015-07-06 16:48 ` [PATCH 19/20] staging/lustre/libcfs: get rid of debugfs/lnet/console_{min,max}_delay_centisecs green
2015-07-06 16:48 ` [PATCH 20/20] staging/lustre/libcfs: remove unused portal_enter_debugger variable green

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150714024925.GA16946@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=green@linuxhacker.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox