]> Git Repo - linux.git/commit
printk/btrfs: handle more message headers
authorPetr Mladek <[email protected]>
Tue, 13 Dec 2016 00:45:50 +0000 (16:45 -0800)
committerLinus Torvalds <[email protected]>
Tue, 13 Dec 2016 02:55:09 +0000 (18:55 -0800)
commit262c5e86fec7cfd59754732001a9ff5b13eba501
tree7ec12f40e1f202e6c488949eb3ed7026a61b3fc1
parent497957576cf8a2150d723aedd74ea60b5d498bfe
printk/btrfs: handle more message headers

Commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing
continuation lines") allows to define more message headers for a single
message.  The motivation is that continuous lines might get mixed.
Therefore it make sense to define the right log level for every piece of
a cont line.

The current btrfs_printk() macros do not support continuous lines at the
moment.  But better be prepared for a custom messages and avoid
potential "lvl" buffer overflow.

This patch iterates over the entire message header.  It is interested
only into the message level like the original code.

This patch also introduces PRINTK_MAX_SINGLE_HEADER_LEN.  Three bytes
are enough for the message level header at the moment.  But it used to
be three, see the commit 04d2c8c83d0e ("printk: convert the format for
KERN_<LEVEL> to a 2 byte pattern").

Also I fixed the default ratelimit level.  It looked very strange when it
was different from the default log level.

[[email protected]: Fix a check of the valid message level]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Petr Mladek <[email protected]>
Acked-by: David Sterba <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Jason Wessel <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Josef Bacik <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/btrfs/super.c
include/linux/printk.h
This page took 0.058946 seconds and 4 git commands to generate.