Re: [PATCH] nilfs2: suggest to use dump_stack() in nilfs_error() and nilfs_warning()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 29 Jun 2014 18:03:41 +0400, Vyacheslav Dubeyko wrote:
> From: Vyacheslav Dubeyko <Vyacheslav.Dubeyko@xxxxxxxx>
> 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@xxxxxxxx>
> CC: Vyacheslav Dubeyko <slava@xxxxxxxxxxx>
> CC: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx>

NAK.

This patch makes error/warning routine of nilfs so verbose.

dump_stack() should be used for some critical situations or internal
inconsisent situtations, or for cases in which the identifying call
path of trouble is not easy.

I think it's not used for regular errors or warnings because they are
mostly identifiable.

In addition, "errors=panic" mount option is available for nilfs_error
to force stack dump.

Regards,
Ryusuke Konishi

> ---
>  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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux