[12/21] erofs: kill verbose debug info in erofs_fill_super
diff mbox series

Message ID 20190901055130.30572-13-hsiangkao@aol.com
State New
Headers show
Series
  • erofs: patchset addressing Christoph's comments
Related show

Commit Message

Gao Xiang Sept. 1, 2019, 5:51 a.m. UTC
From: Gao Xiang <gaoxiang25@huawei.com>

As Christoph said [1], "That is some very verbose
debug info.  We usually don't add that and let
people trace the function instead. "

[1] https://lore.kernel.org/r/20190829101545.GC20598@infradead.org/
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---
 fs/erofs/super.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Christoph Hellwig Sept. 2, 2019, 12:14 p.m. UTC | #1
On Sun, Sep 01, 2019 at 01:51:21PM +0800, Gao Xiang wrote:
> From: Gao Xiang <gaoxiang25@huawei.com>
> 
> As Christoph said [1], "That is some very verbose
> debug info.  We usually don't add that and let
> people trace the function instead. "

Note that this applies to most of the infoln users as far as
I can tell.  And if you want to keep some of those I think you
should converted them to use pr_info directly, and also print
sb->s_id as a prefix before the actual message so that the user
knows which file system is affected.
Gao Xiang Sept. 2, 2019, 12:18 p.m. UTC | #2
Hi Christoph,

On Mon, Sep 02, 2019 at 05:14:24AM -0700, Christoph Hellwig wrote:
> On Sun, Sep 01, 2019 at 01:51:21PM +0800, Gao Xiang wrote:
> > From: Gao Xiang <gaoxiang25@huawei.com>
> > 
> > As Christoph said [1], "That is some very verbose
> > debug info.  We usually don't add that and let
> > people trace the function instead. "
> 
> Note that this applies to most of the infoln users as far as
> I can tell.  And if you want to keep some of those I think you
> should converted them to use pr_info directly, and also print
> sb->s_id as a prefix before the actual message so that the user
> knows which file system is affected.

Thanks for your suggestion...

I think I will turn them into erofs_errln and etc...
and print sb->s_id as a prefix...

Thanks,
Gao Xiang

Patch
diff mbox series

diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index c1a42ea7b72f..b4bf72755300 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -383,9 +383,6 @@  static int erofs_fill_super(struct super_block *sb, void *data, int silent)
 	struct erofs_sb_info *sbi;
 	int err;
 
-	infoln("fill_super, device -> %s", sb->s_id);
-	infoln("options -> %s", (char *)data);
-
 	sb->s_magic = EROFS_SUPER_MAGIC;
 
 	if (!sb_set_blocksize(sb, EROFS_BLKSIZ)) {
@@ -418,9 +415,6 @@  static int erofs_fill_super(struct super_block *sb, void *data, int silent)
 	if (err)
 		return err;
 
-	if (!silent)
-		infoln("root inode @ nid %llu", ROOT_NID(sbi));
-
 	if (test_opt(sbi, POSIX_ACL))
 		sb->s_flags |= SB_POSIXACL;
 	else
@@ -453,7 +447,8 @@  static int erofs_fill_super(struct super_block *sb, void *data, int silent)
 		return err;
 
 	if (!silent)
-		infoln("mounted on %s with opts: %s.", sb->s_id, (char *)data);
+		infoln("mounted on %s with opts: %s, root inode @ nid %llu.",
+		       sb->s_id, (char *)data, ROOT_NID(sbi));
 	return 0;
 }