Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pstore: Allow the user to explicitly choose a backend

pstore only allows one backend to be registered at present, but the
system may provide several. Add a parameter to allow the user to choose
which backend will be used rather than just relying on load order.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by

Matthew Garrett and committed by
Tony Luck
dee28e72 b94fdd07

+19
+6
Documentation/ABI/testing/pstore
··· 39 39 multiple) files based on the record size of the underlying 40 40 persistent storage until at least this amount is reached. 41 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 +
+2
Documentation/kernel-parameters.txt
··· 2151 2151 [HW,MOUSE] Controls Logitech smartscroll autorepeat. 2152 2152 0 = disabled, 1 = enabled (default). 2153 2153 2154 + pstore.backend= Specify the name of the pstore backend to use 2155 + 2154 2156 pt. [PARIDE] 2155 2157 See Documentation/blockdev/paride.txt. 2156 2158
+11
fs/pstore/platform.c
··· 37 37 static DEFINE_SPINLOCK(pstore_lock); 38 38 static struct pstore_info *psinfo; 39 39 40 + static char *backend; 41 + 40 42 /* How much of the console log to snapshot */ 41 43 static unsigned long kmsg_bytes = 10240; 42 44 ··· 133 131 spin_unlock(&pstore_lock); 134 132 return -EBUSY; 135 133 } 134 + 135 + if (backend && strcmp(backend, psi->name)) { 136 + spin_unlock(&pstore_lock); 137 + return -EINVAL; 138 + } 139 + 136 140 psinfo = psi; 137 141 spin_unlock(&pstore_lock); 138 142 ··· 216 208 return 0; 217 209 } 218 210 EXPORT_SYMBOL_GPL(pstore_write); 211 + 212 + module_param(backend, charp, 0444); 213 + MODULE_PARM_DESC(backend, "Pstore backend to use");