[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]

 



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




[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