diff options
author | Luck, Tony <tony.luck@intel.com> | 2013-12-19 03:17:10 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-21 01:12:01 +0400 |
commit | df36ac1bc2a166eef90785d584e4cfed6f52bd32 (patch) | |
tree | 024eb6ee8e997889d9cd31ed97503a158ebf898b /include/linux | |
parent | eaadcfeb31e959028dfa2cc48741e126e3e15b28 (diff) | |
download | linux-df36ac1bc2a166eef90785d584e4cfed6f52bd32.tar.xz |
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 { 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); |