All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH] rpc.idmapd: rework the verbosity of idmapd
Date: Mon, 24 Aug 2020 07:36:33 -0400	[thread overview]
Message-ID: <20200824113633.246214-1-steved@redhat.com> (raw)

-v   means only error
-vv  errors and informational messages
-vvv all debugging messages will be displayed

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/idmapd/idmapd.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index 7d1096d..f3d2314 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -365,7 +365,7 @@ main(int argc, char **argv)
 	if (evbase == NULL)
 		errx(1, "Failed to create event base.");
 
-	if (verbose > 0)
+	if (verbose > 1)
 		xlog_warn("Expiration time is %d seconds.",
 			     cache_entry_expiration);
 	if (serverstart) {
@@ -500,7 +500,7 @@ flush_inotify(int fd)
 		     ptr += sizeof(struct inotify_event) + ev->len) {
 
 			ev = (const struct inotify_event *)ptr;
-			if (verbose > 1)
+			if (verbose > 2)
 				xlog_warn("pipefs inotify: wd=%i, mask=0x%08x, len=%i, name=%s",
 				  ev->wd, ev->mask, ev->len, ev->len ? ev->name : "");
 		}
@@ -562,7 +562,7 @@ dirscancb(int fd, short UNUSED(which), void *data)
 				goto out;
 			}
 
-			if (verbose > 0)
+			if (verbose > 2)
 				xlog_warn("New client: %s", ic->ic_clid);
 
 			ic->ic_id = "Client";
@@ -585,7 +585,7 @@ dirscancb(int fd, short UNUSED(which), void *data)
 			if (ic->ic_dirfd != -1)
 				close(ic->ic_dirfd);
 			TAILQ_REMOVE(icq, ic, ic_next);
-			if (verbose > 0) {
+			if (verbose > 2) {
 				xlog_warn("Stale client: %s", ic->ic_clid);
 				xlog_warn("\t-> closed %s", ic->ic_path);
 			}
@@ -665,7 +665,7 @@ nfsdcb(int UNUSED(fd), short which, void *data)
 		xlog_warn("nfsdcb: bad type in upcall\n");
 		return;
 	}
-	if (verbose > 0)
+	if (verbose > 2)
 		xlog_warn("nfsdcb: authbuf=%s authtype=%s",
 			     authbuf, typebuf);
 
@@ -847,7 +847,7 @@ nfsdreopen_one(struct idmap_client *ic)
 {
 	int fd;
 
-	if (verbose > 0)
+	if (verbose > 2)
 		xlog_warn("ReOpening %s", ic->ic_path);
 
 	if ((fd = open(ic->ic_path, O_RDWR, 0)) != -1) {
@@ -913,7 +913,7 @@ nfsdopenone(struct idmap_client *ic)
 	}
 	event_add(ic->ic_event, NULL);
 
-	if (verbose > 0)
+	if (verbose > 2)
 		xlog_warn("Opened %s", ic->ic_path);
 
 	return (0);
@@ -932,7 +932,8 @@ nfsopen(struct idmap_client *ic)
 			*slash = 0;
 			inotify_add_watch(inotify_fd, ic->ic_path, IN_CREATE | IN_ONLYDIR | IN_ONESHOT);
 			*slash = '/';
-			xlog_warn("Path %s not available. waiting...", ic->ic_path);
+			if (verbose > 2)
+				xlog_warn("Path %s not available. waiting...", ic->ic_path);
 			return -1;
 		}
 
@@ -948,7 +949,7 @@ nfsopen(struct idmap_client *ic)
 		return -1;
 	}
 	event_add(ic->ic_event, NULL);
-	if (verbose > 0)
+	if (verbose > 2)
 		xlog_warn("Opened %s", ic->ic_path);
 
 	return (0);
-- 
2.26.2


             reply	other threads:[~2020-08-24 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24 11:36 Steve Dickson [this message]
2020-08-31 15:00 ` [PATCH] rpc.idmapd: rework the verbosity of idmapd Steve Dickson

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=20200824113633.246214-1-steved@redhat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /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.