linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Freire <rfreire@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: sfrench@samba.org, linux-cifs@vger.kernel.org, piastryyy@gmail.com
Subject: [PATCH v3 0/2] CIFS: Info-level log support, print message when attempting mount.
Date: Sun,  7 Oct 2018 12:21:24 -0300	[thread overview]
Message-ID: <cover.1538873915.git.rfreire@redhat.com> (raw)

Hi Steve,
>From our conversation over v2, I came out with this v3 patch, which I broke
in two commits:

* The first commit in cifs_debug.h, creating the cifs_info() function.
  - The aim of this commit is to allow to the developer to be able to print
    informational-level data without having to use pr_info, pr_notice etc,
    in line with other filesystems.
    . One interesting and noteworthy feature of cifs_info() is that it is
      transparent to the CIFS_DEBUG config state, either in "y" or "n".
    . Also, by using KERN_INFO level, it can be safely filtered by a
      maintainer / administrator, without cluttering their log monitors,
      since this is a low level alert.
  - I took the liberty to not add it inside the existing pr_debug, because
    of the eventual need of some developer to print stuff that should be
    printed not only in CIFS_DEBUG mode (as there are plenty of pr_notice
    scattered over the code).
  - Also, this is not a debug but a info message, so i liked cifs_info() 
    more ;-)
  - I saw plenty of pr_notice() in CIFS code, but I resisted the urge to
    convert them to cifs_info().

* The second commit contains the code printing a cifs_info() when attempting
  a CIFS mount operation.

Appreciate your review.

V3: Created a new cifs_info() function, moved the mount attempt message to
    cifs_info

V2: Created a loop to select the right cifs_dbg message to be printed,
    considering the current system's scenario, in order to avoid a
    duplicate message or stripping out important information in
    debug.

Rodrigo Freire (2):
  CIFS: Adds information-level logging function
  CIFS: Print message when attempting a mount

 fs/cifs/cifs_debug.h | 16 ++++++++++++++++
 fs/cifs/cifsfs.c     |  7 ++++++-
 fs/cifs/transport.c  |  2 +-
 3 files changed, 23 insertions(+), 2 deletions(-)

-- 
1.8.3.1

             reply	other threads:[~2018-10-07 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-07 15:21 Rodrigo Freire [this message]
2018-10-07 15:21 ` [PATCH v3 1/2] CIFS: Adds information-level logging function Rodrigo Freire
2018-10-07 15:21 ` [PATCH v3 2/2] CIFS: Print message when attempting a mount Rodrigo Freire
2018-10-07 18:58 ` [PATCH v3 0/2] CIFS: Info-level log support, print message when attempting mount Steve French
2018-10-07 20:27   ` Rodrigo Freire
2018-10-07 21:06     ` Steve French

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=cover.1538873915.git.rfreire@redhat.com \
    --to=rfreire@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=piastryyy@gmail.com \
    --cc=sfrench@samba.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 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 NNTP newsgroup(s).