* [PATCH] SUNRPC: remove KERN_DEFAULT kernel loglevel from dfprintk
@ 2014-05-29 2:54 Kinglong Mee
[not found] ` <CAHQdGtR4cwdnta0WmfEysfVQTEcsje0xzfM4wx=BWz-sr-JCXQ@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Kinglong Mee @ 2014-05-29 2:54 UTC (permalink / raw)
To: J. Bruce Fields, Trond Myklebust; +Cc: Linux NFS Mailing List, kinglongmee
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 ...).
Signed-off-by: Kinglong Mee <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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] SUNRPC: remove KERN_DEFAULT kernel loglevel from dfprintk
[not found] ` <CAHQdGtR4cwdnta0WmfEysfVQTEcsje0xzfM4wx=BWz-sr-JCXQ@mail.gmail.com>
@ 2014-05-29 3:22 ` Kinglong Mee
[not found] ` <CAHQdGtRWuUBBQ5FATheda1Ocqi2_zvCZ0t_H3qGuqBK_PHa7iA@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Kinglong Mee @ 2014-05-29 3:22 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Dr James Bruce Fields, Linux NFS Mailing List
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SUNRPC: remove KERN_DEFAULT kernel loglevel from dfprintk
[not found] ` <CAHQdGtRWuUBBQ5FATheda1Ocqi2_zvCZ0t_H3qGuqBK_PHa7iA@mail.gmail.com>
@ 2014-05-29 3:41 ` Kinglong Mee
0 siblings, 0 replies; 3+ messages in thread
From: Kinglong Mee @ 2014-05-29 3:41 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Dr James Bruce Fields, Linux NFS Mailing List
On 5/29/2014 11:32, Trond Myklebust wrote:
> On Wed, May 28, 2014 at 11:22 PM, Kinglong Mee <kinglongmee@gmail.com <mailto:kinglongmee@gmail.com>> wrote:
>> On 5/29/2014 11:15, Trond Myklebust wrote:
>>> Nack. This is an api change...
>>
>> API change ? printk ? dprintk?
>
> dprintk != printk. We have NEVER supported dprintk(KERN_WARNING...)
>
> Please use one or the other, but don't try to mix APIs.
Thank you very much.
I will send a new patch for change the using of dprintk(KERN_WARNING...).
thanks,
Kinglong Mee
>
>>>
>>> On May 28, 2014 10:55 PM, "Kinglong Mee" <kinglongmee@gmail.com <mailto:kinglongmee@gmail.com> <mailto: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> <mailto: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
>>>
>
>
>
> --
> Trond Myklebust
>
> Linux NFS client maintainer, PrimaryData
>
> trond.myklebust@primarydata.com <mailto:trond.myklebust@primarydata.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-29 3:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[not found] ` <CAHQdGtRWuUBBQ5FATheda1Ocqi2_zvCZ0t_H3qGuqBK_PHa7iA@mail.gmail.com>
2014-05-29 3:41 ` Kinglong Mee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).