DragonFly kernel List (threaded) for 2009-06
DragonFly BSD
DragonFly kernel List (threaded) for 2009-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: HAMMER changes in HEAD, also needs testing


From: Dennis Melentyev <dennis.melentyev@xxxxxxxxx>
Date: Mon, 22 Jun 2009 00:53:24 +0300

Hi Matt,

2009/6/21 Matthew Dillon <dillon@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]