]> git.karo-electronics.de Git - karo-tx-linux.git/commit
efi_pstore: Add ctime to argument of erase callback
authorSeiji Aguchi <seiji.aguchi@hds.com>
Wed, 14 Nov 2012 20:27:28 +0000 (20:27 +0000)
committerTony Luck <tony.luck@intel.com>
Wed, 14 Nov 2012 22:28:43 +0000 (14:28 -0800)
commit1c5a706c271ee23bd2671bf38569f54bb27e2766
tree140af84a69be58992cb7e90a19a78c3df16fde0f
parentf97944393d545c1584efdc09f2d147132ef50630
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:1234567823456789

[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>
drivers/acpi/apei/erst.c
drivers/firmware/efivars.c
fs/pstore/inode.c
fs/pstore/ram.c
include/linux/pstore.h