diff mbox series

nfsd: Demote UMH upcall init message from warning- to info-level

Message ID 20210312112840.49517-1-pmenzel@molgen.mpg.de (mailing list archive)
State New, archived
Headers show
Series nfsd: Demote UMH upcall init message from warning- to info-level | expand

Commit Message

Paul Menzel March 12, 2021, 11:28 a.m. UTC
By default, using `printk()`, Linux logs messages with level warning,
which leaves the user seeing

    NFSD: Using UMH upcall client tracking operations.

what to do about it. Reading `nfsd4_umh_cltrack_init()`, the message is
actually logged on success, so nothing needs to be done, and the info
level should be used.

Cc: linux-nfs@vger.kernel.org
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
 fs/nfsd/nfs4recover.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Menzel March 12, 2021, 11:33 a.m. UTC | #1
Dear Linux folks,


Am 12.03.21 um 12:28 schrieb Paul Menzel:
> By default, using `printk()`, Linux logs messages with level warning,
> which leaves the user seeing
> 
>      NFSD: Using UMH upcall client tracking operations.
> 
> what to do about it. Reading `nfsd4_umh_cltrack_init()`, the message is
> actually logged on success, so nothing needs to be done, and the info
> level should be used.
> 
> Cc: linux-nfs@vger.kernel.org
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
>   fs/nfsd/nfs4recover.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
> index 891395c6c7d3..db66c45a6b97 100644
> --- a/fs/nfsd/nfs4recover.c
> +++ b/fs/nfsd/nfs4recover.c
> @@ -1864,7 +1864,7 @@ nfsd4_umh_cltrack_init(struct net *net)
>   	ret = nfsd4_umh_cltrack_upcall("init", NULL, grace_start, NULL);
>   	kfree(grace_start);
>   	if (!ret)
> -		printk("NFSD: Using UMH upcall client tracking operations.\n");
> +		pr_info("NFSD: Using UMH upcall client tracking operations.\n");
>   	return ret;
>   }

A debug-level message could also be used, or the line totally removed, 
and the condition be changed to print an error in case of failure. I am 
wondering about the benefit for the user reading through the logs. Maybe 
the log was only there, because UMH upcall client tracking operations 
were something new?


Kind regards,

Paul
J. Bruce Fields March 12, 2021, 3:32 p.m. UTC | #2
On Fri, Mar 12, 2021 at 12:33:00PM +0100, Paul Menzel wrote:
> Dear Linux folks,
> 
> 
> Am 12.03.21 um 12:28 schrieb Paul Menzel:
> >By default, using `printk()`, Linux logs messages with level warning,
> >which leaves the user seeing
> >
> >     NFSD: Using UMH upcall client tracking operations.
> >
> >what to do about it. Reading `nfsd4_umh_cltrack_init()`, the message is
> >actually logged on success, so nothing needs to be done, and the info
> >level should be used.
> >
> >Cc: linux-nfs@vger.kernel.org
> >Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> >---
> >  fs/nfsd/nfs4recover.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
> >index 891395c6c7d3..db66c45a6b97 100644
> >--- a/fs/nfsd/nfs4recover.c
> >+++ b/fs/nfsd/nfs4recover.c
> >@@ -1864,7 +1864,7 @@ nfsd4_umh_cltrack_init(struct net *net)
> >  	ret = nfsd4_umh_cltrack_upcall("init", NULL, grace_start, NULL);
> >  	kfree(grace_start);
> >  	if (!ret)
> >-		printk("NFSD: Using UMH upcall client tracking operations.\n");
> >+		pr_info("NFSD: Using UMH upcall client tracking operations.\n");
> >  	return ret;
> >  }
> 
> A debug-level message could also be used, or the line totally
> removed, and the condition be changed to print an error in case of
> failure. I am wondering about the benefit for the user reading
> through the logs. Maybe the log was only there, because UMH upcall
> client tracking operations were something new?

Could be.

I think debug-level would be fine.

--b.
diff mbox series

Patch

diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 891395c6c7d3..db66c45a6b97 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -1864,7 +1864,7 @@  nfsd4_umh_cltrack_init(struct net *net)
 	ret = nfsd4_umh_cltrack_upcall("init", NULL, grace_start, NULL);
 	kfree(grace_start);
 	if (!ret)
-		printk("NFSD: Using UMH upcall client tracking operations.\n");
+		pr_info("NFSD: Using UMH upcall client tracking operations.\n");
 	return ret;
 }