aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ABI/testing/pstore6
-rw-r--r--Documentation/kernel-parameters.txt2
-rw-r--r--fs/pstore/platform.c11
3 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/pstore b/Documentation/ABI/testing/pstore
index ddf451ee2a08..ff1df4e3b059 100644
--- a/Documentation/ABI/testing/pstore
+++ b/Documentation/ABI/testing/pstore
@@ -39,3 +39,9 @@ Description: Generic interface to platform dependent persistent storage.
39 multiple) files based on the record size of the underlying 39 multiple) files based on the record size of the underlying
40 persistent storage until at least this amount is reached. 40 persistent storage until at least this amount is reached.
41 Default is 10 Kbytes. 41 Default is 10 Kbytes.
42
43 Pstore only supports one backend at a time. If multiple
44 backends are available, the preferred backend may be
45 set by passing the pstore.backend= argument to the kernel at
46 boot time.
47
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index aa47be71df4c..8789d0c9291a 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2151,6 +2151,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2151 [HW,MOUSE] Controls Logitech smartscroll autorepeat. 2151 [HW,MOUSE] Controls Logitech smartscroll autorepeat.
2152 0 = disabled, 1 = enabled (default). 2152 0 = disabled, 1 = enabled (default).
2153 2153
2154 pstore.backend= Specify the name of the pstore backend to use
2155
2154 pt. [PARIDE] 2156 pt. [PARIDE]
2155 See Documentation/blockdev/paride.txt. 2157 See Documentation/blockdev/paride.txt.
2156 2158
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 49ff1de2178a..c5300ec31696 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -37,6 +37,8 @@
37static DEFINE_SPINLOCK(pstore_lock); 37static DEFINE_SPINLOCK(pstore_lock);
38static struct pstore_info *psinfo; 38static struct pstore_info *psinfo;
39 39
40static char *backend;
41
40/* How much of the console log to snapshot */ 42/* How much of the console log to snapshot */
41static unsigned long kmsg_bytes = 10240; 43static unsigned long kmsg_bytes = 10240;
42 44
@@ -131,6 +133,12 @@ int pstore_register(struct pstore_info *psi)
131 spin_unlock(&pstore_lock); 133 spin_unlock(&pstore_lock);
132 return -EBUSY; 134 return -EBUSY;
133 } 135 }
136
137 if (backend && strcmp(backend, psi->name)) {
138 spin_unlock(&pstore_lock);
139 return -EINVAL;
140 }
141
134 psinfo = psi; 142 psinfo = psi;
135 spin_unlock(&pstore_lock); 143 spin_unlock(&pstore_lock);
136 144
@@ -208,3 +216,6 @@ int pstore_write(enum pstore_type_id type, char *buf, size_t size)
208 return 0; 216 return 0;
209} 217}
210EXPORT_SYMBOL_GPL(pstore_write); 218EXPORT_SYMBOL_GPL(pstore_write);
219
220module_param(backend, charp, 0444);
221MODULE_PARM_DESC(backend, "Pstore backend to use");