All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nilfs2: suggest to use dump_stack() in nilfs_error() and nilfs_warning()
@ 2014-06-29 14:03 Vyacheslav Dubeyko
  2014-06-29 19:01 ` Ryusuke Konishi
  0 siblings, 1 reply; 5+ messages in thread
From: Vyacheslav Dubeyko @ 2014-06-29 14:03 UTC (permalink / raw)
  To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA
  Cc: Ryusuke Konishi, Vyacheslav.Dubeyko-XckBA8eALwE, Andrew Morton

From: Vyacheslav Dubeyko <Vyacheslav.Dubeyko-XckBA8eALwE@public.gmane.org>
Subject: [PATCH] nilfs2: suggest to use dump_stack() in nilfs_error() and nilfs_warning()

This patch suggests to use dump_stack() call in nilfs_error() and
nilfs_warning() for more clear understanding of different type of
issues. As a result, end-users can report more informative
descriptions of issues.

Signed-off-by: Vyacheslav Dubeyko <Vyacheslav.Dubeyko-XckBA8eALwE@public.gmane.org>
CC: Vyacheslav Dubeyko <slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
CC: Ryusuke Konishi <konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
---
 fs/nilfs2/inode.c |    1 -
 fs/nilfs2/super.c |    5 ++++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index 6252b17..745e96d 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -970,7 +970,6 @@ void nilfs_dirty_inode(struct inode *inode, int flags)
 	if (is_bad_inode(inode)) {
 		nilfs_warning(inode->i_sb, __func__,
 			      "tried to mark bad_inode dirty. ignored.\n");
-		dump_stack();
 		return;
 	}
 	if (mdi) {
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 8c532b2..c6cd607 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -123,6 +123,8 @@ void nilfs_error(struct super_block *sb, const char *function,
 
 	va_end(args);
 
+	dump_stack();
+
 	if (!(sb->s_flags & MS_RDONLY)) {
 		nilfs_set_error(sb);
 
@@ -152,8 +154,9 @@ void nilfs_warning(struct super_block *sb, const char *function,
 	       sb->s_id, function, &vaf);
 
 	va_end(args);
-}
 
+	dump_stack();
+}
 
 struct inode *nilfs_alloc_inode(struct super_block *sb)
 {
-- 
1.7.9.5


--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-01 19:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-29 14:03 [PATCH] nilfs2: suggest to use dump_stack() in nilfs_error() and nilfs_warning() Vyacheslav Dubeyko
2014-06-29 19:01 ` Ryusuke Konishi
     [not found]   ` <20140630.040159.120185966358440318.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-06-30  8:24     ` Vyacheslav Dubeyko
2014-07-01  8:51       ` dE
2014-07-01 19:30       ` Ryusuke Konishi

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.