  Reiserfs file system uses a hash function plus a generation counter
  in determining the key used in directory searching.

  We do this for compatibility with NFS,  which needs to be able to
  use a 32 (v2) or 64 bit (v3)  integer  to  specify  where  it  last
  read  from in a  directory  (the  NFS  cookie)  because it
  stupidly  assumes  that directories  are  implemented as files
  with  byte  offsets  and directories are never shrunk.  It seems
  V4 will be fixing that.  This  hash function determines the order
  of insertions. That can have dramatic impact on performance for
  large directories  because it can cause a random I/O per filename
  created.  
  
  If you want certainty of avoiding hash collisions, which will cause 
  a -EHASHCOLLISION error if you have more collisions on a 
  given hash value  than  the maximum  generation counter (128), you 
  should use the specify -h tea running mkreiserfs. 
      
  The Rupasov Hash  makes  an  attempt to preserve much of  the order 
  that will be present in  alphabetically  or numerically consecutive 
  names while adding just enough randomness for it to work as a hash.
  Note that if it gets the order reversed,  the LRU algorithm 
  will still work  better than if it fully randomizes.....
  
  TEA_HASH allows you to have fewer collisions, and this means that you
  can have directories that are larger. As a practical matter, users 
  never report r5 is insufficient for applications that are not deliberately 
  designed to make r5 inadequate on current hardware.  r5 is faster 
  for large directories, 30x faster for ones that exceed cache capacity.

  Use r5, teahash is almost, but not quite always, the wrong answer.  
  This hashing feature exists to cover over bad design of telldir and NFS 
  cookies which assume that a byte offset into a directory has meaning and 
  allocate a number of bytes appropriate for use of a byte offset not a 
  filename for tracking position of a partial directory read in directories.

  RUPASOV_HASH:
  Invented by  Yuri Rupasov  while studying the problems of creating 
  directories too large to fit into RAM.  Never slower than 
  CRYPTO_SECURE_HASH, and for some applications involving directories 
  too large for RAM it can be as much as 30 times faster.  For normal 
  size  directories it makes reiserfs work with the same speed or 
  just a bit faster than tea hash function.  
  
  Rupasov_hash is obsolete, please use r5_hash.
    
  R5_HASH:
  Invented by Yuri Rupasov to solve collisions problem of rupasov_hash
  in case of names with long identical tails. R5_hash gives the same or
  better speed, so please use it to work with huge dirs.  
  
  The default hash is 'r5' hash.
  
  examples :
  # mkreiserfs /dev/xxxx -h tea
  # mkreiserfs /dev/xxxx -h r5



