[PATCH] LogFS take three
Arnd Bergmann
arnd at arndb.de
Thu May 17 17:00:20 EDT 2007
On Thursday 17 May 2007, Jörn Engel wrote:
>
> > Why not just store 64 bit nanoseconds? that would avoid the problem
> > with ns overflow and the year-2038 bug. OTOH, that would require
> > a 64 bit integer division when reading the data, so it gets you
> > a runtime overhead.
>
> I like the idea. Do conversion function exist both way?
>
> What I don't get is the year-2038 bug. Isn't that the 31bit limit,
> while 32bit would last to 2106?
You're right, you don't hit the 2038 bug here, because you use an
unsigned variable. The bug exists elsewhere because time_t tv_sec
is signed.
Just using nanoseconds probably doesn't gain you much after all
then. You could however just have separate 32 bit fields in the
inode for seconds and nanoseconds, that will result in the exact
same layout that you have right now, but won't require a conversion
function.
Arnd <><
More information about the linux-mtd
mailing list