mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: dragos.tatulea@intel.com
To: cbouatmailru@gmail.com, linux-kernel@vger.kernel.org
Cc: adrian.hunter@intel.com, octavian.purdila@intel.com
Subject: [PATCH 1/8] pstore: add flags
Date: Mon, 15 Oct 2012 14:38:50 +0300	[thread overview]
Message-ID: <1350301137-16912-2-git-send-email-dragos.tatulea@intel.com> (raw)
In-Reply-To: <1350301137-16912-1-git-send-email-dragos.tatulea@intel.com>

From: Adrian Hunter <adrian.hunter@intel.com>

Let the back end tweak pstore behaviour.  Flags added are:

	PSTORE_NO_HEADINGS

		Omit pstore heading lines from dumped data

	PSTORE_MAX_KMSG_BYTES

		Default kmsg_bytes to ULONG_MAX

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
--
 fs/pstore/platform.c   |    9 ++++++++-
 include/linux/pstore.h |    4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index a40da07..c4ea778 100644
-- a/fs/pstore/platform.c
++ b/fs/pstore/platform.c
@@ -128,7 +128,11 @@ static void pstore_dump(struct kmsg_dumper *dumper,
 		size_t len;
 
 		dst = psinfo->buf;
		hsize = sprintf(dst, "%s#%d Part%d\n", why, oopscount, part);
		if (psinfo->flags & PSTORE_NO_HEADINGS)
			hsize = 0;
		else
			hsize = sprintf(dst, "%s#%d Part%d\n", why, oopscount,
					part);
 		size = psinfo->bufsize - hsize;
 		dst += hsize;
 
@@ -237,6 +241,9 @@ int pstore_register(struct pstore_info *psi)
 		return -EINVAL;
 	}
 
	if (psinfo->flags & PSTORE_MAX_KMSG_BYTES)
		kmsg_bytes = ULONG_MAX;

 	if (pstore_is_mounted())
 		pstore_get_records(0);
 
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index ee3034a..55ab23f 100644
-- a/include/linux/pstore.h
++ b/include/linux/pstore.h
@@ -40,9 +40,13 @@ enum pstore_type_id {
 
 struct module;
 
#define PSTORE_NO_HEADINGS	BIT(0)
#define PSTORE_MAX_KMSG_BYTES	BIT(1)

 struct pstore_info {
 	struct module	*owner;
 	char		*name;
	unsigned int	flags;
 	spinlock_t	buf_lock;	/* serialize access to 'buf' */
 	char		*buf;
 	size_t		bufsize;
- 
1.7.9.5


  reply	other threads:[~2012-10-15 11:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 11:38 [PATCH 0/8] pstore: add interface for dumpers and add task list dumper dragos.tatulea
2012-10-15 11:38 ` dragos.tatulea [this message]
2012-10-15 11:38 ` [PATCH 2/8] pstore: add debugfs support for causing dumps and panics dragos.tatulea
2012-10-15 11:38 ` [PATCH 3/8] pstore: add support for external writers dragos.tatulea
2012-10-15 11:38 ` [PATCH 4/8] pstore: allow storing different type id's in ram backend dragos.tatulea
2012-10-15 11:38 ` [PATCH 5/8] pstore: add task list dumper dragos.tatulea
2012-10-15 11:38 ` [PATCH 6/8] pstore: do not run timer while pstore is not mounted dragos.tatulea
2012-10-15 11:38 ` [PATCH 7/8] pstore: make sure pstore_write exists on flush error dragos.tatulea
2012-10-15 11:38 ` [PATCH 8/8] pstore: max out console log level during sysfs dump switch dragos.tatulea
2012-10-15 16:39 ` [PATCH 0/8] pstore: add interface for dumpers and add task list dumper Anton Vorontsov
2012-10-15 16:41   ` Anton Vorontsov
2012-10-15 11:40 dragos.tatulea
2012-10-15 11:40 ` [PATCH 1/8] pstore: add flags dragos.tatulea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350301137-16912-2-git-send-email-dragos.tatulea@intel.com \
    --to=dragos.tatulea@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=cbouatmailru@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=octavian.purdila@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®