subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1701048 - /subversion/trunk/subversion/libsvn_subr/io.c
Date Thu, 03 Sep 2015 15:16:51 GMT
Author: ivan
Date: Thu Sep  3 15:16:50 2015
New Revision: 1701048

URL: http://svn.apache.org/r1701048
Log:
* subversion/libsvn_subr/io.c: Call svn_io_file_rename2() with
  FLUSH_TO_DISK=TRUE and remove posix-specific flushing to disk, since
  svn_io_file_rename2() will do this for us.

Modified:
    subversion/trunk/subversion/libsvn_subr/io.c

Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1701048&r1=1701047&r2=1701048&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Thu Sep  3 15:16:50 2015
@@ -3874,7 +3874,7 @@ svn_io_write_atomic(const char *final_pa
     err = svn_io_copy_perms(copy_perms_path, tmp_path, scratch_pool);
 
   if (!err)
-    err = svn_io_file_rename2(tmp_path, final_path, FALSE, scratch_pool);
+    err = svn_io_file_rename2(tmp_path, final_path, TRUE, scratch_pool);
 
   if (err)
     {
@@ -3888,21 +3888,6 @@ svn_io_write_atomic(const char *final_pa
                                                       scratch_pool));
     }
 
-#ifdef SVN_ON_POSIX
-  {
-    /* On POSIX, the file name is stored in the file's directory entry.
-       Hence, we need to fsync() that directory as well.
-       On other operating systems, we'd only be asking for trouble
-       by trying to open and fsync a directory. */
-    apr_file_t *file;
-
-    SVN_ERR(svn_io_file_open(&file, dirname, APR_READ, APR_OS_DEFAULT,
-                             scratch_pool));
-    SVN_ERR(svn_io_file_flush_to_disk(file, scratch_pool));
-    SVN_ERR(svn_io_file_close(file, scratch_pool));
-  }
-#endif
-
   return SVN_NO_ERROR;
 }
 



Mime
View raw message