lkml.org 
[lkml]   [2012]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 8/9] pstore: max out console log level during sysfs dump switch
On Thu, Oct 18, 2012 at 02:06:06PM +0300, dragos.tatulea@intel.com wrote:
> From: Dragos Tatulea <dragos.tatulea@intel.com>
>
> Otherwise we might miss out on some pstore dumpers that use
> printks below current log level.

If anything, this should be folded into 'pstore: add debugfs support for
causing dumps and panics'. But I'm not sure about the debugfs stuff
anyway.

> Signed-off-by: Dragos Tatulea <dragos.tatulea@intel.com>
> ---
> fs/pstore/platform.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
> index 25f59ed..e3ad13e 100644
> --- a/fs/pstore/platform.c
> +++ b/fs/pstore/platform.c
> @@ -267,6 +267,7 @@ static DEFINE_SPINLOCK(dbg_lock);
> static int dbg_dump(void *data, u64 val)
> {
> unsigned long flags;
> + int saved_loglevel;
>
> switch (val) {
> case KMSG_DUMP_PANIC:
> @@ -276,7 +277,10 @@ static int dbg_dump(void *data, u64 val)
> case KMSG_DUMP_HALT:
> case KMSG_DUMP_POWEROFF:
> spin_lock_irqsave(&dbg_lock, flags);
> + saved_loglevel = console_loglevel;
> + console_loglevel = 15;
> kmsg_dump(val);
> + console_loglevel = saved_loglevel;
> spin_unlock_irqrestore(&dbg_lock, flags);
> return 0;
> }
> --
> 1.7.9.5


\
 
 \ /
  Last update: 2012-11-18 04:21    [W:3.014 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site