All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kinglong Mee <kinglongmee@gmail.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Dr James Bruce Fields <bfields@fieldses.org>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] SUNRPC: remove KERN_DEFAULT kernel loglevel from dfprintk
Date: Thu, 29 May 2014 11:22:43 +0800	[thread overview]
Message-ID: <5386A803.4080703@gmail.com> (raw)
In-Reply-To: <CAHQdGtR4cwdnta0WmfEysfVQTEcsje0xzfM4wx=BWz-sr-JCXQ@mail.gmail.com>

On 5/29/2014 11:15, Trond Myklebust wrote:
> Nack. This is an api change...

API change ? printk ? dprintk?

> 
> On May 28, 2014 10:55 PM, "Kinglong Mee" <kinglongmee@gmail.com <mailto:kinglongmee@gmail.com>> wrote:
> 
>     When debugging, rpc prints messages for dprintk(KERN_WARNING ...) as,
> 
>     [ 2780.339988] ^A4nfsd: connect from unprivileged port: 0000:0000:0000:0000:0000:0000:0000:0001, port=35316
> 
>     Because, it expends as printk(KERN_DEFAULT KERN_WARNING ...).

net/sunrpc/svcsock.c:852, and fs/nfsd/nfsfh.c:91 call dprintk as,
dprintk(KERN_WARNING ...) ---> printk(KERN_DEFAULT KERN_WARNING ...)

so that, "^A4" will be prefixed before the debugging message.

thanks,
Kinglong Mee

> 
>     Signed-off-by: Kinglong Mee <kinglongmee@gmail.com <mailto:kinglongmee@gmail.com>>
>     ---
>      include/linux/sunrpc/debug.h | 4 ++--
>      1 file changed, 2 insertions(+), 2 deletions(-)
> 
>     diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
>     index 9385bd7..742e2ac 100644
>     --- a/include/linux/sunrpc/debug.h
>     +++ b/include/linux/sunrpc/debug.h
>     @@ -42,14 +42,14 @@ extern unsigned int         nlm_debug;
>      # define dfprintk(fac, args...)        \
>             do { \
>                     ifdebug(fac) \
>     -                       printk(KERN_DEFAULT args); \
>     +                       printk(args); \
>             } while (0)
> 
>      # define dfprintk_rcu(fac, args...)    \
>             do { \
>                     ifdebug(fac) { \
>                             rcu_read_lock(); \
>     -                       printk(KERN_DEFAULT args); \
>     +                       printk(args); \
>                             rcu_read_unlock(); \
>                     } \
>             } while (0)
>     --
>     1.9.3
> 

  parent reply	other threads:[~2014-05-29  3:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29  2:54 [PATCH] SUNRPC: remove KERN_DEFAULT kernel loglevel from dfprintk Kinglong Mee
     [not found] ` <CAHQdGtR4cwdnta0WmfEysfVQTEcsje0xzfM4wx=BWz-sr-JCXQ@mail.gmail.com>
2014-05-29  3:22   ` Kinglong Mee [this message]
     [not found]     ` <CAHQdGtRWuUBBQ5FATheda1Ocqi2_zvCZ0t_H3qGuqBK_PHa7iA@mail.gmail.com>
2014-05-29  3:41       ` Kinglong Mee

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=5386A803.4080703@gmail.com \
    --to=kinglongmee@gmail.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.