bcache: Convert pr_<level> uses to a more typical style
Remove the trailing newline from the define of pr_fmt and add newlines
to the uses.
Miscellanea:
o Convert bch_bkey_dump from multiple uses of pr_err to pr_cont
as the earlier conversion was inappropriate done causing multiple
lines to be emitted where only a single output line was desired
o Use vsprintf extension %pV in bch_cache_set_error to avoid multiple
line output where only a single line output was desired
o Coalesce formats
Fixes: 6ae63e3501
("bcache: replace printk() by pr_*() routines")
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -65,14 +65,14 @@ void bch_count_backing_io_errors(struct cached_dev *dc, struct bio *bio)
|
||||
* we shouldn't count failed REQ_RAHEAD bio to dc->io_errors.
|
||||
*/
|
||||
if (bio->bi_opf & REQ_RAHEAD) {
|
||||
pr_warn_ratelimited("%s: Read-ahead I/O failed on backing device, ignore",
|
||||
pr_warn_ratelimited("%s: Read-ahead I/O failed on backing device, ignore\n",
|
||||
dc->backing_dev_name);
|
||||
return;
|
||||
}
|
||||
|
||||
errors = atomic_add_return(1, &dc->io_errors);
|
||||
if (errors < dc->error_limit)
|
||||
pr_err("%s: IO error on backing device, unrecoverable",
|
||||
pr_err("%s: IO error on backing device, unrecoverable\n",
|
||||
dc->backing_dev_name);
|
||||
else
|
||||
bch_cached_dev_error(dc);
|
||||
@@ -123,12 +123,12 @@ void bch_count_io_errors(struct cache *ca,
|
||||
errors >>= IO_ERROR_SHIFT;
|
||||
|
||||
if (errors < ca->set->error_limit)
|
||||
pr_err("%s: IO error on %s%s",
|
||||
pr_err("%s: IO error on %s%s\n",
|
||||
ca->cache_dev_name, m,
|
||||
is_read ? ", recovering." : ".");
|
||||
else
|
||||
bch_cache_set_error(ca->set,
|
||||
"%s: too many IO errors %s",
|
||||
"%s: too many IO errors %s\n",
|
||||
ca->cache_dev_name, m);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user