Re: [PATCH v3] nfsd: Log error on UMH upcall init failure and debug message on success

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paul-

> On Mar 12, 2021, at 12:09 PM, Paul Menzel <pmenzel@xxxxxxxxxxxxx> wrote:
> 
> By default, using `printk()`, Linux logs messages with level warning,
> which leaves the user reading
> 
>    NFSD: Using UMH upcall client tracking operations.
> 
> wondering what to do about it. Reading `nfsd4_umh_cltrack_init()`, the
> message is actually logged on success, so nothing needs to be done, and
> it was decided to use the debug level.
> 
> Additionally, Linux now logs an error on init failure.
> 
>    NFSD: Failed to init UMH upcall client tracking operations.
> 
> Cc: linux-nfs@xxxxxxxxxxxxxxx
> Signed-off-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
> ---
> v2: Log error and demote success message to debug-level (forgot `-a` in `git commit --amend`)
> v3: Actually sent correct diff
> 
> fs/nfsd/nfs4recover.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
> index 891395c6c7d3..fff89c739033 100644
> --- a/fs/nfsd/nfs4recover.c
> +++ b/fs/nfsd/nfs4recover.c
> @@ -1863,8 +1863,11 @@ 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");
> +	if (ret)
> +		pr_debug("NFSD: Using UMH upcall client tracking operations.\n");

Looking back at 869216075b63 ("nfsd: re-order client tracking method selection"),
the idea here seems to be that only one of the "Using yada upcall client" is
supposed to fire. If an error occurs here, there is a fallback. No additional
error need be reported, IMHO.

So the printk() call-sites added by 869216075b63 all need to be adjusted to use
pr_info(), I think?


> +	else
> +		pr_err("NFSD: Failed to init UMH upcall client tracking operations.");
> +
> 	return ret;
> }
> 
> -- 
> 2.30.2
> 

--
Chuck Lever







[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux