HAMMER changes in HEAD, also needs testing

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Mon Jun 22 02:30:56 PDT 2009


Dennis Melentyev wrote:
   I also made a minor change to cpdup to not use temporary filenames
   when doing a fresh copy (when the target file does not exist).  To test
   HAMMER with cpdup you need the new cpdup.  The old cpdup always creates
   a temporary file and then rename()'s and that unfortunately breaks the
   optimization that HAMMER makes to order the inode numbers.
Just not sure was it the right decision. AFAIU, tmpname->rename was
there because of atomicity of file operation, so the file with correct
name appear fully written.
I see two different possible optimization ways:

- Determine inode number from the parent directory inode number, not from 
the filename hash.  This won't give linearity within the directory scan, 
but will give rough spatial locality vs temporal locality (i.e. adding a 
file to a directory every day won't make hammer jump all over the place). 
 This is very important in my eyes.

- Implement "link data extents from other file" ioctl.  Just write data to 
a tmp file, then create the dst file with the data extents of the temp 
file.  Like a hardlink, just on the backend fs layer.  That's cute, but 
not really necessary.

cheers
  simon
--
  <3 the future  +++  RENT this banner advert  +++   ASCII Ribbon   /"\
  rock the past  +++  space for low CHF NOW!1  +++     Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \




More information about the Kernel mailing list