From: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org, paulus@samba.org,
linux-kernel@vger.kernel.org, benh@kernel.crashing.org
Cc: jkenisto@linux.vnet.ibm.com, tony.luck@intel.com,
mahesh@linux.vnet.ibm.com, cbouatmailru@gmail.com,
anton@samba.org, ccross@android.com, keescook@chromium.org
Subject: [PATCH 1/3] Retreive header size from pstore
Date: Mon, 24 Jun 2013 11:52:56 +0530 [thread overview]
Message-ID: <20130624062255.12963.71137.stgit@aruna-ThinkPad-T420> (raw)
In-Reply-To: <20130624061936.12963.72529.stgit@aruna-ThinkPad-T420>
pstore_get_header_size will return the size of the header added by pstore
while logging messages to the registered buffer.
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
---
fs/pstore/platform.c | 7 ++++++-
include/linux/pstore.h | 6 ++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 86d1038..e8260ea 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -49,6 +49,7 @@ MODULE_PARM_DESC(update_ms, "milliseconds before pstore updates its content "
"corruption on Oopses)");
static int pstore_new_entry;
+static int hsize;
static void pstore_timefunc(unsigned long);
static DEFINE_TIMER(pstore_timer, pstore_timefunc, 0, 0);
@@ -68,6 +69,11 @@ static char *backend;
/* How much of the console log to snapshot */
static unsigned long kmsg_bytes = 10240;
+int pstore_get_header_size(void)
+{
+ return hsize;
+}
+
void pstore_set_kmsg_bytes(int bytes)
{
kmsg_bytes = bytes;
@@ -147,7 +153,6 @@ static void pstore_dump(struct kmsg_dumper *dumper,
while (total < kmsg_bytes) {
char *dst;
unsigned long size;
- int hsize;
size_t len;
dst = psinfo->buf;
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index 656699f..f43b64f 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -73,6 +73,7 @@ struct pstore_info {
#ifdef CONFIG_PSTORE
extern int pstore_register(struct pstore_info *);
extern bool pstore_cannot_block_path(enum kmsg_dump_reason reason);
+extern int pstore_get_header_size(void);
#else
static inline int
pstore_register(struct pstore_info *psi)
@@ -84,6 +85,11 @@ pstore_cannot_block_path(enum kmsg_dump_reason reason)
{
return false;
}
+static inline int
+pstore_get_header_size(void)
+{
+ return 0;
+}
#endif
#endif /*_LINUX_PSTORE_H*/
next prev parent reply other threads:[~2013-06-24 6:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 6:22 [RESEND PATCH 0/3] Nvram-to-pstore: compression support for oops data Aruna Balakrishnaiah
2013-06-24 6:22 ` Aruna Balakrishnaiah [this message]
2013-06-24 6:23 ` [PATCH 2/3] powerpc/pseries: Re-organise the oops compression code Aruna Balakrishnaiah
2013-06-24 6:23 ` [PATCH 3/3] powerpc/pseries: Support compression of oops text via pstore Aruna Balakrishnaiah
2013-06-24 17:57 ` Kees Cook
2013-06-25 7:04 ` Aruna Balakrishnaiah
2013-06-25 16:02 ` Luck, Tony
2013-06-27 9:42 ` Aruna Balakrishnaiah
2013-06-25 16:55 ` Kees Cook
-- strict thread matches above, loose matches on Subject: below --
2013-04-26 9:55 [RFC PATCH 0/3] Nvram-to-pstore: compression support for oops data Aruna Balakrishnaiah
2013-04-26 9:55 ` [PATCH 1/3] Retreive header size from pstore Aruna Balakrishnaiah
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=20130624062255.12963.71137.stgit@aruna-ThinkPad-T420 \
--to=aruna@linux.vnet.ibm.com \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=cbouatmailru@gmail.com \
--cc=ccross@android.com \
--cc=jkenisto@linux.vnet.ibm.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=tony.luck@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;
as well as URLs for NNTP newsgroup(s).