Re: HAMMER changes in HEAD, also needs testing

看板DFBSD_kernel作者時間16年前 (2009/06/22 06:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/8 (看更多)
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
文章代碼(AID): #1AFgsZ00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #1AFgsZ00 (DFBSD_kernel)