From: Steve French <smfrench@gmail.com>
To: Pierguido Lambri <plambri@redhat.com>
Cc: Linux CIFS Mailing list <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] cifs.upcall: add option to enable debug logs
Date: Mon, 13 Apr 2026 09:21:18 -0500 [thread overview]
Message-ID: <CAH2r5mvgd9W4QJ603uv9UAQ6R=ASnORea532o8Ok7kjhJvEh4A@mail.gmail.com> (raw)
In-Reply-To: <20260129140948.621754-1-plambri@redhat.com>
merged the three patches into cifs-utils for-next
On Thu, Jan 29, 2026 at 8:09 AM Pierguido Lambri <plambri@redhat.com> wrote:
>
> cifs.upcall uses two levels of logs, DEBUG and ERR.
> However, when using systemd, these logs will always be recorded.
> When the system does a lot of upcalls, the journal could be filled
> with debug logs, which may not be useful at that time.
> Added then a new option '-d' to enable debug logs only when needed.
> This will set a logmask up to LOG_DEBUG instead of the default
> of LOG_ERR, thus reducing the amount of logs when no debug is needed.
>
> Signed-off-by: Pierguido Lambri <plambri@redhat.com>
> Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
> ---
> cifs.upcall.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/cifs.upcall.c b/cifs.upcall.c
> index 69e27a3..9c2843d 100644
> --- a/cifs.upcall.c
> +++ b/cifs.upcall.c
> @@ -1356,7 +1356,7 @@ lowercase_string(char *c)
>
> static void usage(void)
> {
> - fprintf(stderr, "Usage: %s [ -K /path/to/keytab] [-k /path/to/krb5.conf] [-E] [-t] [-v] [-l] [-e nsecs] key_serial\n", prog);
> + fprintf(stderr, "Usage: %s [ -K /path/to/keytab] [-k /path/to/krb5.conf] [-d] [-E] [-t] [-v] [-l] [-e nsecs] key_serial\n", prog);
> }
>
> static const struct option long_options[] = {
> @@ -1379,6 +1379,7 @@ int main(const int argc, char *const argv[])
> size_t datalen;
> long rc = 1;
> int c;
> + int mask;
> bool try_dns = false, legacy_uid = false , env_probe = true;
> char *buf;
> char hostbuf[NI_MAXHOST], *host;
> @@ -1395,12 +1396,19 @@ int main(const int argc, char *const argv[])
> hostbuf[0] = '\0';
>
> openlog(prog, 0, LOG_DAEMON);
> + mask = LOG_UPTO(LOG_ERR);
> + setlogmask(mask);
>
> - while ((c = getopt_long(argc, argv, "cEk:K:ltve:", long_options, NULL)) != -1) {
> + while ((c = getopt_long(argc, argv, "cdEk:K:ltve:", long_options, NULL)) != -1) {
> switch (c) {
> case 'c':
> /* legacy option -- skip it */
> break;
> + case 'd':
> + /* enable debug logs */
> + mask = LOG_UPTO(LOG_DEBUG);
> + setlogmask(mask);
> + break;
> case 'E':
> /* skip probing initiating process env */
> env_probe = false;
> --
> 2.52.0
>
>
--
Thanks,
Steve
next prev parent reply other threads:[~2026-04-13 14:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 14:08 [PATCH v2 1/3] cifs.upcall: add option to enable debug logs Pierguido Lambri
2026-01-29 14:08 ` [PATCH v2 2/3] docs: Enable " Pierguido Lambri
2026-01-29 14:08 ` [PATCH v2 3/3] cifs.upcall: Adjust log level Pierguido Lambri
2026-04-13 14:21 ` Steve French [this message]
2026-04-16 12:31 ` [PATCH v2 1/3] cifs.upcall: add option to enable debug logs Bharath SM
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='CAH2r5mvgd9W4QJ603uv9UAQ6R=ASnORea532o8Ok7kjhJvEh4A@mail.gmail.com' \
--to=smfrench@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=plambri@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).