Skip to contentSkip to conversation

idmapd: Turn down the verbosity in flush_inotify()

PATCH In review Steve Dickson 1 participant 2 messages Aug 5, 2020 – Aug 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 idmapd: Turn down the verbosity in flush_inotify()

So idmapd does not flood the logs with messages
nobody will understand, only print the message
with verbose is set.

---
 utils/idmapd/idmapd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
utils/idmapd/idmapd.c +2 -1
index 8631414..7d1096d 100644
@@ -500,7 +500,8 @@ flush_inotify(int fd)
 		     ptr += sizeof(struct inotify_event) + ev->len) {
 
 			ev = (const struct inotify_event *)ptr;
-			xlog_warn("pipefs inotify: wd=%i, mask=0x%08x, len=%i, name=%s",
+			if (verbose > 1)
+				xlog_warn("pipefs inotify: wd=%i, mask=0x%08x, len=%i, name=%s",
 				  ev->wd, ev->mask, ev->len, ev->len ? ev->name : "");
 		}
 	}
Signature · 1 line
2.24.1
#1 lore raw
Quoted 5 lines · Steve Dickson

So idmapd does not flood the logs with messages
nobody will understand, only print the message
with verbose is set.

Committed...

steved.

Quoted 19 lines
---
 utils/idmapd/idmapd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
utils/idmapd/idmapd.c +2 -1
index 8631414..7d1096d 100644
@@ -500,7 +500,8 @@ flush_inotify(int fd)
 		     ptr += sizeof(struct inotify_event) + ev->len) {
 
 			ev = (const struct inotify_event *)ptr;
-			xlog_warn("pipefs inotify: wd=%i, mask=0x%08x, len=%i, name=%s",
+			if (verbose > 1)
+				xlog_warn("pipefs inotify: wd=%i, mask=0x%08x, len=%i, name=%s",
 				  ev->wd, ev->mask, ev->len, ev->len ? ev->name : "");
 		}
 	}