diff options
author | Seiji Aguchi <seiji.aguchi@hds.com> | 2012-11-14 20:27:28 +0000 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2012-11-26 16:02:12 -0800 |
commit | a9efd39cd547223597cfe7c53acec44c099b9264 (patch) | |
tree | 293feed9e89d811235371d389f7787eddf2899e1 /drivers/acpi/apei | |
parent | 96480d9c8fcfd7e325e9be6a6c6846689707f8e0 (diff) | |
download | blackbird-op-linux-a9efd39cd547223597cfe7c53acec44c099b9264.tar.gz blackbird-op-linux-a9efd39cd547223597cfe7c53acec44c099b9264.zip |
efi_pstore: Add ctime to argument of erase callback
[Issue]
Currently, a variable name, which is used to identify each log entry, consists of type,
id and ctime. But an erase callback does not use ctime.
If efi_pstore supported just one log, type and id were enough.
However, in case of supporting multiple logs, it doesn't work because
it can't distinguish each entry without ctime at erasing time.
<Example>
As you can see below, efi_pstore can't differentiate first event from second one without ctime.
a variable name of first event: dump-type0-1-12345678
a variable name of second event: dump-type0-1-23456789
type:0
id:1
ctime:12345678, 23456789
[Solution]
This patch adds ctime to an argument of an erase callback.
It works across reboots because ctime of pstore means the date that the record was originally stored.
To do this, efi_pstore saves the ctime to variable name at writing time and passes it to pstore
at reading time.
Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Acked-by: Mike Waychison <mikew@google.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/erst.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index e4d9d24eb73d..0bd6ae4a899f 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -938,7 +938,7 @@ static int erst_writer(enum pstore_type_id type, enum kmsg_dump_reason reason, u64 *id, unsigned int part, size_t size, struct pstore_info *psi); static int erst_clearer(enum pstore_type_id type, u64 id, - struct pstore_info *psi); + struct timespec time, struct pstore_info *psi); static struct pstore_info erst_info = { .owner = THIS_MODULE, @@ -1102,7 +1102,7 @@ static int erst_writer(enum pstore_type_id type, enum kmsg_dump_reason reason, } static int erst_clearer(enum pstore_type_id type, u64 id, - struct pstore_info *psi) + struct timespec time, struct pstore_info *psi) { return erst_clear(id); } |