[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3d99e1291b3bc8f2a78467d11b1a7a31393180fc.1589086800.git.riteshh@linux.ibm.com>
Date: Sun, 10 May 2020 11:54:56 +0530
From: Ritesh Harjani <riteshh@...ux.ibm.com>
To: linux-ext4@...r.kernel.org
Cc: linux-fsdevel@...r.kernel.org, Jan Kara <jack@...e.com>,
tytso@....edu, "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
Ritesh Harjani <riteshh@...ux.ibm.com>
Subject: [RFC 16/16] ext4: Add process name and pid in ext4_msg()
This adds process name and pid for ext4_msg().
I found this to be useful. For e.g. below print gives more
info about process name and pid.
[ 7671.131912] [mount/12543] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: acl,user_xattr
Signed-off-by: Ritesh Harjani <riteshh@...ux.ibm.com>
---
fs/ext4/super.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index bf5fcb477f66..5067a47f4f46 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -756,7 +756,8 @@ void __ext4_msg(struct super_block *sb,
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
- printk("%sEXT4-fs (%s): %pV\n", prefix, sb->s_id, &vaf);
+ printk("%s [%s/%d] EXT4-fs (%s): %pV\n", prefix, current->comm,
+ task_pid_nr(current), sb->s_id, &vaf);
va_end(args);
}
--
2.21.0
Powered by blists - more mailing lists