[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A5ED84D3BB3A384992CBB9C77DEDA4D47FA0B6EF@USINDEM103.corp.hds.com>
Date: Wed, 20 Nov 2013 15:17:55 +0000
From: Seiji Aguchi <seiji.aguchi@....com>
To: Madper Xie <cxie@...hat.com>, Richard Weinberger <richard@....at>
CC: Tony Luck <tony.luck@...il.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
> Then will lost the sequence of our log. We will get lots of entries like
> "dmesg-efi-`unique but meaningless number here`" in pstore fs. Who will
> know which file is the latest record?
Ah, that's good point.
> And another side, the combin of timestamp, count and part is unique. Why
> we generate a unique number from a unique number?
> if you think "making a string from three ints and then a parse it to a
> int again" is odd, i'd like to use ((timestamp * 100 + part) * 100 +
> count.
How about calculating the number of digit of part /count, instead of using fixed "100"?
We can ensure the uniqueness of each id by doing it.
digit_num = log2(part)/log2(10) + 1
timestamp * 10^(digit_num + 1)
Seiji
Powered by blists - more mailing lists