From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Mark Brown <broonie@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] debugfs: log errors when something goes wrong
Date: Wed, 3 Jul 2019 16:53:57 +0200 [thread overview]
Message-ID: <20190703145357.GA15756@kroah.com> (raw)
In-Reply-To: <s5hpnmrmpe1.wl-tiwai@suse.de>
On Wed, Jul 03, 2019 at 11:35:50AM +0200, Takashi Iwai wrote:
> On Wed, 03 Jul 2019 11:32:33 +0200,
> Greg Kroah-Hartman wrote:
> >
> > On Wed, Jul 03, 2019 at 11:10:44AM +0200, Rafael J. Wysocki wrote:
> > > On Wed, Jul 3, 2019 at 9:17 AM Greg Kroah-Hartman
> > > <gregkh@linuxfoundation.org> wrote:
> > > >
> > > > As it is not recommended that debugfs calls be checked, it was pointed
> > > > out that major errors should still be logged somewhere so that
> > > > developers and users have a chance to figure out what went wrong. To
> > > > help with this, error logging has been added to the debugfs core so that
> > > > it is not needed to be present in every individual file that calls
> > > > debugfs.
> > > >
> > > > Reported-by: Mark Brown <broonie@kernel.org>
> > > > Reported-by: Takashi Iwai <tiwai@suse.de>
> > > > Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> > > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > >
> > > Generally speaking
> > >
> > > Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > >
> > > > ---
> > > > fs/debugfs/inode.c | 25 ++++++++++++++++++++-----
> > > > 1 file changed, 20 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
> > > > index f04c8475d9a1..7f43c8acfcbf 100644
> > > > --- a/fs/debugfs/inode.c
> > > > +++ b/fs/debugfs/inode.c
> > > > @@ -2,8 +2,9 @@
> > > > /*
> > > > * inode.c - part of debugfs, a tiny little debug file system
> > > > *
> > > > - * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
> > > > + * Copyright (C) 2004,2019 Greg Kroah-Hartman <greg@kroah.com>
> > > > * Copyright (C) 2004 IBM Inc.
> > > > + * Copyright (C) 2019 Linux Foundation <gregkh@linuxfoundation.org>
> > > > *
> > > > * debugfs is for people to use instead of /proc or /sys.
> > > > * See ./Documentation/core-api/kernel-api.rst for more details.
> > > > @@ -294,8 +295,10 @@ static struct dentry *start_creating(const char *name, struct dentry *parent)
> > > >
> > > > error = simple_pin_fs(&debug_fs_type, &debugfs_mount,
> > > > &debugfs_mount_count);
> > > > - if (error)
> > > > + if (error) {
> > > > + pr_err("Unable to pin filesystem for file '%s'\n", name);
> > >
> > > But I'm not sure about the log level here. Particularly, why would
> > > pr_info() not work?
> >
> > It could, but it is an error in that debugfs didn't do what was asked of
> > it. I really don't care either way, the odds of anyone ever seeing this
> > message is almost none :)
>
> Yes, that's an obvious error and I see no big reason to hide it.
>
> For both:
> Reviewed-by: Takashi Iwai <tiwai@suse.de>
Thanks all for the review, I'll go apply these to my tree now.
greg k-h
next prev parent reply other threads:[~2019-07-03 14:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 7:16 [PATCH 1/2] debugfs: provide pr_fmt() macro Greg Kroah-Hartman
2019-07-03 7:16 ` [PATCH 2/2] debugfs: log errors when something goes wrong Greg Kroah-Hartman
2019-07-03 9:10 ` Rafael J. Wysocki
2019-07-03 9:32 ` Greg Kroah-Hartman
2019-07-03 9:35 ` Takashi Iwai
2019-07-03 14:53 ` Greg Kroah-Hartman [this message]
2019-07-03 9:37 ` Rafael J. Wysocki
2019-07-03 11:43 ` Mark Brown
2019-07-03 9:09 ` [PATCH 1/2] debugfs: provide pr_fmt() macro Rafael J. Wysocki
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=20190703145357.GA15756@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=tiwai@suse.de \
/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.