Re: HAMMER changes in HEAD, also needs testing
Hi Matt,
2009/6/21 Matthew Dillon <dillon@apollo.backplane.com>:
> =C2=A0 =C2=A0I've made some fairly straightforward changes to HAMMER in H=
EAD, but
> =C2=A0 =C2=A0they need testing.
>
.....
> =C2=A0 =C2=A0I also made a minor change to cpdup to not use temporary fil=
enames
> =C2=A0 =C2=A0when doing a fresh copy (when the target file does not exist=
). =C2=A0To test
> =C2=A0 =C2=A0HAMMER with cpdup you need the new cpdup. =C2=A0The old cpdu=
p always creates
> =C2=A0 =C2=A0a temporary file and then rename()'s and that unfortunately =
breaks the
> =C2=A0 =C2=A0optimization 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.
--=20
Dennis Melentyev
討論串 (同標題文章)
完整討論串 (本文為第 3 之 8 篇):