18c2ecf20Sopenharmony_ciWhat:		/sys/fs/pstore/... (or /dev/pstore/...)
28c2ecf20Sopenharmony_ciDate:		March 2011
38c2ecf20Sopenharmony_ciKernelVersion: 2.6.39
48c2ecf20Sopenharmony_ciContact:	tony.luck@intel.com
58c2ecf20Sopenharmony_ciDescription:	Generic interface to platform dependent persistent storage.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci		Platforms that provide a mechanism to preserve some data
88c2ecf20Sopenharmony_ci		across system reboots can register with this driver to
98c2ecf20Sopenharmony_ci		provide a generic interface to show records captured in
108c2ecf20Sopenharmony_ci		the dying moments.  In the case of a panic the last part
118c2ecf20Sopenharmony_ci		of the console log is captured, but other interesting
128c2ecf20Sopenharmony_ci		data can also be saved::
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci		    # mount -t pstore -o kmsg_bytes=8000 - /sys/fs/pstore
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci		    $ ls -l /sys/fs/pstore/
178c2ecf20Sopenharmony_ci		    total 0
188c2ecf20Sopenharmony_ci		    -r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci		Different users of this interface will result in different
218c2ecf20Sopenharmony_ci		filename prefixes.  Currently two are defined:
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci		- "dmesg" - saved console log
248c2ecf20Sopenharmony_ci		- "mce"   - architecture dependent data from fatal h/w error
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci		Once the information in a file has been read, removing
278c2ecf20Sopenharmony_ci		the file will signal to the underlying persistent storage
288c2ecf20Sopenharmony_ci		device that it can reclaim the space for later re-use::
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci		    $ rm /sys/fs/pstore/dmesg-erst-1
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci		The expectation is that all files in /sys/fs/pstore/
338c2ecf20Sopenharmony_ci		will be saved elsewhere and erased from persistent store
348c2ecf20Sopenharmony_ci		soon after boot to free up space ready for the next
358c2ecf20Sopenharmony_ci		catastrophe.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci		The 'kmsg_bytes' mount option changes the target amount of
388c2ecf20Sopenharmony_ci		data saved on each oops/panic. Pstore saves (possibly
398c2ecf20Sopenharmony_ci		multiple) files based on the record size of the underlying
408c2ecf20Sopenharmony_ci		persistent storage until at least this amount is reached.
418c2ecf20Sopenharmony_ci		Default is 10 Kbytes.
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci		Pstore only supports one backend at a time. If multiple
448c2ecf20Sopenharmony_ci		backends are available, the preferred backend may be
458c2ecf20Sopenharmony_ci		set by passing the pstore.backend= argument to the kernel at
468c2ecf20Sopenharmony_ci		boot time.
47