aboutsummaryrefslogtreecommitdiff
path: root/fs/pstore/internal.h
diff options
context:
space:
mode:
authorLuck, Tony <tony.luck@intel.com>2011-08-11 15:14:39 -0700
committerTony Luck <tony.luck@intel.com>2011-08-16 11:53:01 -0700
commit6dda9266913ad57e09afc1a10d6473f10c806a63 (patch)
treec29258f6b3fd8a9bb080b395157f013f32c0f313 /fs/pstore/internal.h
parent93ee7a9340d64f20295aacc3fb6a22b759323280 (diff)
pstore: defer inserting OOPS entries into pstore
Life is simple for all the kernel terminating types of kmsg_dump call backs - pstore just saves the tail end of the console log. But for "oops" the situation is more complex - the kernel may carry on running (possibly for ever). So we'd like to make the logged copy of the oops appear in the pstore filesystem - so that the user has a handle to clear the entry from the persistent backing store (if we don't, the store may fill with "oops" entries (that are also safely stashed in /var/log/messages) leaving no space for real errors. Current code calls pstore_mkfile() immediately. But this may not be safe. The oops could have happened with arbitrary locks held, or in interrupt or NMI context. So allocating memory and calling into generic filesystem code seems unwise. This patch defers making the entry appear. At the time of the oops, we merely set a flag "pstore_new_entry" noting that a new entry has been added. A periodic timer checks once a minute to see if the flag is set - if so, it schedules a work queue to rescan the backing store and make all new entries appear in the pstore filesystem. Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'fs/pstore/internal.h')
-rw-r--r--fs/pstore/internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pstore/internal.h b/fs/pstore/internal.h
index 611c1b3c46fa..3bde461c3f34 100644
--- a/fs/pstore/internal.h
+++ b/fs/pstore/internal.h
@@ -1,5 +1,5 @@
extern void pstore_set_kmsg_bytes(int);
-extern void pstore_get_records(void);
+extern void pstore_get_records(int);
extern int pstore_mkfile(enum pstore_type_id, char *psname, u64 id,
char *data, size_t size,
struct timespec time, struct pstore_info *psi);