pstore: Don't allow high traffic options on fragile devices
Some pstore backing devices use on board flash as persistent storage. These have limited numbers of write cycles so it is a poor idea to use them from high frequency operations. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
eaadcfeb31
commit
df36ac1bc2
@@ -51,6 +51,7 @@ struct pstore_info {
|
||||
char *buf;
|
||||
size_t bufsize;
|
||||
struct mutex read_mutex; /* serialize open/read/close */
|
||||
int flags;
|
||||
int (*open)(struct pstore_info *psi);
|
||||
int (*close)(struct pstore_info *psi);
|
||||
ssize_t (*read)(u64 *id, enum pstore_type_id *type,
|
||||
@@ -70,6 +71,8 @@ struct pstore_info {
|
||||
void *data;
|
||||
};
|
||||
|
||||
#define PSTORE_FLAGS_FRAGILE 1
|
||||
|
||||
#ifdef CONFIG_PSTORE
|
||||
extern int pstore_register(struct pstore_info *);
|
||||
extern bool pstore_cannot_block_path(enum kmsg_dump_reason reason);
|
||||
|
Reference in New Issue
Block a user