From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933452AbcKJNVA (ORCPT ); Thu, 10 Nov 2016 08:21:00 -0500 Received: from mx2.suse.de ([195.135.220.15]:41716 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932825AbcKJNU7 (ORCPT ); Thu, 10 Nov 2016 08:20:59 -0500 Date: Thu, 10 Nov 2016 14:20:53 +0100 From: David Sterba To: Petr Mladek Cc: Linus Torvalds , Chris Mason , Josef Bacik , Sergey Senozhatsky , Steven Rostedt , Andrew Morton , Joe Perches , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, Jason Wessel Subject: Re: [PATCH v2 3/4] printk/btrfs: Handle more message headers Message-ID: <20161110132053.GC12522@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Petr Mladek , Linus Torvalds , Chris Mason , Josef Bacik , Sergey Senozhatsky , Steven Rostedt , Andrew Morton , Joe Perches , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, Jason Wessel References: <1478695291-12169-1-git-send-email-pmladek@suse.com> <1478695291-12169-4-git-send-email-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478695291-12169-4-git-send-email-pmladek@suse.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_ 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 Acked-by: David Sterba