Fix issue #3442, fsfs revprop files are not fsync()ed to disk before being rename()d, which can result in a 0 byte revprops file on ext4 and GPFS filesystems if the system crashes between the time the directory metadata was flushed to disk and the file's blocks were flushed.
Fix issue #3442, fsfs revprop files are not fsync()ed to disk before
being rename()d, which can result in a 0 byte revprops file on ext4
and GPFS filesystems if the system crashes between the time the
directory metadata was flushed to disk and the file's blocks were
flushed.

This fix also prevents writing on top of the existing existing
revprops file which could also lead to a loss of data.  It now writes
the new revprops to a new unique filename and then atomically renames
it into place.

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__change_txn_props):
    Replace svn_io_file_open() with svn_io_write_unique() and write
      the revprops in there, then rename the file.
    Use svn_io_file_rename() instead of move_into_place() as
      move_into_place() only seems to be used when moving in the
      committed repository, not transactions.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@878353 13f79535-47bb-0310-9956-ffa450edef68

YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion