HAMMER changes in HEAD, also needs testing

Dennis Melentyev dennis.melentyev at gmail.com
Sun Jun 21 14:57:13 PDT 2009


Hi Matt,

2009/6/21 Matthew Dillon <dillon at apollo.backplane.com>:
>    I've made some fairly straightforward changes to HAMMER in HEAD, but
>    they need testing.
>
. ...
>    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.
Direct file creation sure improve performance with your changes, but
afraid, could lead to race conditions if someone is working with files
cpdup is creating right now. I'm talking about chances to read
partially copied files.
It should be Ok for backup (unless unexpected power down), but
definitely not ok for mirroring (and serving mirrored files).

Or, I could misread your post.

-- 
Dennis Melentyev





More information about the Kernel mailing list