diff options
author | Matthew Garrett <mjg@redhat.com> | 2011-07-22 00:57:53 +0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2011-07-23 03:14:20 +0400 |
commit | 56280682ceeef74b692b3e21d1872049eea7c887 (patch) | |
tree | 6d00729db23dff065ad60bf2f7be3f96b6fd4008 /fs/pstore/inode.c | |
parent | 638c1fd3033c76778e6d9975ad8a4a9cdd5b96d9 (diff) | |
download | linux-56280682ceeef74b692b3e21d1872049eea7c887.tar.xz |
pstore: Add extra context for writes and erases
EFI only provides small amounts of individual storage, and conventionally
puts metadata in the storage variable name. Rather than add a metadata
header to the (already limited) variable storage, it's easier for us to
modify pstore to pass all the information we need to construct a unique
variable name to the appropriate functions.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'fs/pstore/inode.c')
-rw-r--r-- | fs/pstore/inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index b19884a1ba77..893b961dcfd8 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c @@ -39,8 +39,9 @@ #define PSTORE_NAMELEN 64 struct pstore_private { - u64 id; struct pstore_info *psi; + enum pstore_type_id type; + u64 id; ssize_t size; char data[]; }; @@ -73,7 +74,7 @@ static int pstore_unlink(struct inode *dir, struct dentry *dentry) { struct pstore_private *p = dentry->d_inode->i_private; - p->psi->erase(p->id, p->psi); + p->psi->erase(p->type, p->id, p->psi); return simple_unlink(dir, dentry); } @@ -192,6 +193,7 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, private = kmalloc(sizeof *private + size, GFP_KERNEL); if (!private) goto fail_alloc; + private->type = type; private->id = id; private->psi = psi; |