2020-08-05 19:06:30

by Steve Dickson

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Steve Dickson <[email protected]>
---
utils/idmapd/idmapd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index 8631414..7d1096d 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -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 : "");
}
}
--
2.24.1


2020-08-07 15:12:24

by Steve Dickson

[permalink] [raw]
Subject: Re: [PATCH] idmapd: Turn down the verbosity in flush_inotify()



On 8/5/20 3:00 PM, Steve Dickson wrote:
> So idmapd does not flood the logs with messages
> nobody will understand, only print the message
> with verbose is set.
>
> Signed-off-by: Steve Dickson <[email protected]>
Committed...

steved.
> ---
> utils/idmapd/idmapd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
> index 8631414..7d1096d 100644
> --- a/utils/idmapd/idmapd.c
> +++ b/utils/idmapd/idmapd.c
> @@ -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 : "");
> }
> }
>