[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A5ED84D3BB3A384992CBB9C77DEDA4D47F9DE083@USINDEM103.corp.hds.com>
Date: Sat, 2 Nov 2013 12:28:19 +0000
From: Seiji Aguchi <seiji.aguchi@....com>
To: Tony Luck <tony.luck@...il.com>
CC: Richard Weinberger <richard@....at>, Madper Xie <cxie@...hat.com>,
"matt.fleming@...el.com" <matt.fleming@...el.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Linux EFI <linux-efi@...r.kernel.org>,
谢成骏 <bbboson@...il.com>
Subject: RE: [PATCH] Make efi-pstore return a unique id
> How does efivars backend handle "unlink(2)" in the pstore file system.
> pstore will call the backend->erase function passing the "id". The
> backend should then erase the right record from persistent storage.
>
> With the ((timestamp * 100 + part) * 100 + count function - you can
> easily reverse it to find timestamp, part and count - would that make life
> easier for the backend to find the record to be erased? If you use a
> hash function you will need to check each record and compute the
> hash to see if it matches (probably not a big deal because the backend
> will generally only hold a handful of records).
By generating the id in efi_pstore_write(), and using it to a variable name,
It works at an erasing time as well.
The root cause of this problem is that efivars used "part" as id.
It was a wrong way. So, we should not keep it.
Seiji
Powered by blists - more mailing lists