mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Joe Perches <joe@perches.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: super.c: Update logging style using PR_CONT
Date: Wed, 12 Oct 2016 12:41:57 +0200	[thread overview]
Message-ID: <20161012104157.GB14664@quack2.suse.cz> (raw)
In-Reply-To: <ac72258a7f35042014aede22502d947b59ada155.1476237454.git.joe@perches.com>

On Tue 11-10-16 18:57:58, Joe Perches wrote:
> Recent commit require line continuing printks to use PR_CONT.
> 
> Update super.c to use PR_CONT and use vsprintf extension %pV
> to avoid a printk/vprintk/printk("\n") sequence as well.

Looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  fs/ext4/super.c | 21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 6db81fbcbaa6..20da99da0a34 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -597,14 +597,15 @@ void __ext4_std_error(struct super_block *sb, const char *function,
>  void __ext4_abort(struct super_block *sb, const char *function,
>  		unsigned int line, const char *fmt, ...)
>  {
> +	struct va_format vaf;
>  	va_list args;
>  
>  	save_error_info(sb, function, line);
>  	va_start(args, fmt);
> -	printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: ", sb->s_id,
> -	       function, line);
> -	vprintk(fmt, args);
> -	printk("\n");
> +	vaf.fmt = fmt;
> +	vaf.va = &args;
> +	printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: %pV\n",
> +	       sb->s_id, function, line, &vaf);
>  	va_end(args);
>  
>  	if ((sb->s_flags & MS_RDONLY) == 0) {
> @@ -2715,12 +2716,12 @@ static void print_daily_error_info(unsigned long arg)
>  		       es->s_first_error_func,
>  		       le32_to_cpu(es->s_first_error_line));
>  		if (es->s_first_error_ino)
> -			printk(": inode %u",
> +			printk(KERN_CONT ": inode %u",
>  			       le32_to_cpu(es->s_first_error_ino));
>  		if (es->s_first_error_block)
> -			printk(": block %llu", (unsigned long long)
> +			printk(KERN_CONT ": block %llu", (unsigned long long)
>  			       le64_to_cpu(es->s_first_error_block));
> -		printk("\n");
> +		printk(KERN_CONT "\n");
>  	}
>  	if (es->s_last_error_time) {
>  		printk(KERN_NOTICE "EXT4-fs (%s): last error at time %u: %.*s:%d",
> @@ -2729,12 +2730,12 @@ static void print_daily_error_info(unsigned long arg)
>  		       es->s_last_error_func,
>  		       le32_to_cpu(es->s_last_error_line));
>  		if (es->s_last_error_ino)
> -			printk(": inode %u",
> +			printk(KERN_CONT ": inode %u",
>  			       le32_to_cpu(es->s_last_error_ino));
>  		if (es->s_last_error_block)
> -			printk(": block %llu", (unsigned long long)
> +			printk(KERN_CONT ": block %llu", (unsigned long long)
>  			       le64_to_cpu(es->s_last_error_block));
> -		printk("\n");
> +		printk(KERN_CONT "\n");
>  	}
>  	mod_timer(&sbi->s_err_report, jiffies + 24*60*60*HZ);  /* Once a day */
>  }
> -- 
> 2.10.0.rc2.1.g053435c
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2016-10-12 10:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12  1:57 Joe Perches
2016-10-12 10:41 ` Jan Kara [this message]
2016-10-12 14:32   ` Joe Perches
2016-10-12 22:13     ` Theodore Ts'o
2016-10-13  3:14       ` Theodore Ts'o

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=20161012104157.GB14664@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=adilger.kernel@dilger.ca \
    --cc=joe@perches.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome