lkml.org 
[lkml]   [2016]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/4] printk/btrfs: Handle more message headers
On Wed, Nov 09, 2016 at 01:41:30PM +0100, Petr Mladek wrote:
> The commit 4bcc595ccd80decb4245096e ("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 04d2c8c83d0e3ac5f ("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.
>
> Signed-off-by: Petr Mladek <pmladek@suse.com>

Acked-by: David Sterba <dsterba@suse.com>

\
 
 \ /
  Last update: 2016-11-10 14:21    [W:0.578 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site