diff options
author | Luck, Tony <tony.luck@intel.com> | 2013-12-18 18:17:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-20 16:12:01 -0500 |
commit | df36ac1bc2a166eef90785d584e4cfed6f52bd32 (patch) | |
tree | 024eb6ee8e997889d9cd31ed97503a158ebf898b /include/linux | |
parent | eaadcfeb31e959028dfa2cc48741e126e3e15b28 (diff) |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/pstore.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h index abd437d0a8a7..ece0c6bbfcc5 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h | |||
@@ -51,6 +51,7 @@ struct pstore_info { | |||
51 | char *buf; | 51 | char *buf; |
52 | size_t bufsize; | 52 | size_t bufsize; |
53 | struct mutex read_mutex; /* serialize open/read/close */ | 53 | struct mutex read_mutex; /* serialize open/read/close */ |
54 | int flags; | ||
54 | int (*open)(struct pstore_info *psi); | 55 | int (*open)(struct pstore_info *psi); |
55 | int (*close)(struct pstore_info *psi); | 56 | int (*close)(struct pstore_info *psi); |
56 | ssize_t (*read)(u64 *id, enum pstore_type_id *type, | 57 | ssize_t (*read)(u64 *id, enum pstore_type_id *type, |
@@ -70,6 +71,8 @@ struct pstore_info { | |||
70 | void *data; | 71 | void *data; |
71 | }; | 72 | }; |
72 | 73 | ||
74 | #define PSTORE_FLAGS_FRAGILE 1 | ||
75 | |||
73 | #ifdef CONFIG_PSTORE | 76 | #ifdef CONFIG_PSTORE |
74 | extern int pstore_register(struct pstore_info *); | 77 | extern int pstore_register(struct pstore_info *); |
75 | extern bool pstore_cannot_block_path(enum kmsg_dump_reason reason); | 78 | extern bool pstore_cannot_block_path(enum kmsg_dump_reason reason); |