Should we change dirent for 64 bit directory cookies ?

Pedro Giffuni pfgshield-freebsd at yahoo.com
Thu Jul 31 23:37:08 UTC 2008


Hello fs gurus;

I've been sort of following the DragonFly list wrt to the changes Matt made for his HAMMER fs.
I don't know if anyone is considering a port: he added a lot of stuff to the base system that will be a pain to port, but he also triggered some bugs in the old BSD code that would be nice to fix on FreeBSD too.

One of the not-*too*-tough things to consider adopting would be 64 directory cookies:

Main commit:
http://leaf.dragonflybsd.org/mailarchive/commits/2007-11/msg00151.html
Follow up for the linuxulator:
http://leaf.dragonflybsd.org/mailarchive/commits/2007-11/msg00153.html

Here is a excerpt of a discussion from the DragonFly Kernel ML (Re: [Tux3] Comparison to Hammer fs design), that pretty much sums up the issues:
________
...
:>     The cookies are 64 bits in DragonFly.  I'm not sure why Linux would
:>     still be using 32 bit cookies, file offsets are 64 bits so you
:>     should be able to use 64 bit cookies.
:
:It is not Linux that perpetrates this outrage, it is NVFS v2.  We can't
:just tell everybody that their NFS v2 clients are now broken.

    Oh, we don't care about NFSv2 all that much any more.  NFSv3 is the
    bare minimum.  NFSv2 is extremely old, nobody should be using it any
    more.  Even NFSv3 is getting fairly long in the tooth now.

:>     For NFS in DragonFly I use a 64 bit cookie where 32 bits is a hash key
:>     and 32 bits is an iterator to deal with hash collisions.  Poof,
:>     problem solved.
:
:Which was my original proposal to solve the problem.  Then Ted told me
:about NFS v2 :-O
:
:Actually, NFS hands you a 62 bit cookie with the high bits of both s32
:parts unused.  NFS v2 gives you a 31 bit cookie.  Bleah.

    I'd recommend dropping support for NFSv2.  It is not really worth 
    supporting any more.   Does it even support 64 bit inodes? (I don't 
    remember), or 64 bit file offsets?  NFSv2 is garbage.

    You should be able to use 63 bits of the cookie, I don't know why
    you wouldn't use the high bit of the lsb 32 bit part.  There is no
    requirement that that bit be 0.  In fact, the RFC says the cookie is
    a 64 bit unsigned integer and you should be able to use all 64 bits.
    If linux is not allowing all 64 bits to be used then it's a serious
    bug in linux.  The cookies are supposed to be opaque, just like the
    file handle.
...
_________



      Posta, news, sport, oroscopo: tutto in una sola pagina. 
Crea l'home page che piace a te!
www.yahoo.it/latuapagina


More information about the freebsd-fs mailing list