subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Huijben <b...@qqmail.nl>
Subject RE: svn commit: r1483781 -
Date Fri, 17 May 2013 13:18:35 GMT
 /subversion/trunk/subversion/libsvn_subr/io.c
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Are you sure this resolves your actual problem ?

For really small files Windows doesn't create a full on disk
representation of the file and stores the data inside the MFT.

Given that the reproduction requires a hardware failure I'm not sure if
we are just slowing down to resolve/hide symptoms instead of resolving
the problem.

Introducing a major sleep operation would probably resolve the same
symptom as it would make it unlikely to kill the power exactly at the
right point in time.

The journaling properties of ntfs and other similarly designed file
systems should have removed the full flush requirements as each
operation is only performed after committing the journal.

Bert From: ivan@apache.org
Sent: =E2=80=8E17/=E2=80=8E05/=E2=80=8E2013 15:07
To: commits@subversion.apache.org
Subject: svn commit: r1483781
- /subversion/trunk/subversion/libsvn_subr/io.c
Author: ivan
Date: Fri May 17 13:01:08 2013
New Revision: 1483781

URL: http://svn.apache.org/r1483781
Log:
Fix FSFS repository corruption on power or network disk failure on Windows:
http://svn.haxx.se/dev/archive-2013-05/0245.shtml

This is revert of r1082451.

* subversion/libsvn_subr/io.c
  (svn_io_write_unique): Perform svn_io_file_flush_to_disk() on all=20
   platforms.

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/i=
o.c?rev=3D1483781&r1=3D1483780&r2=3D1483781&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Fri May 17 13:01:08 2013
@@ -3472,17 +3472,8 @@ svn_io_write_unique(const char **tmp_pat
=20
   err =3D svn_io_file_write_full(new_file, buf, nbytes, NULL, pool);
=20
-  /* ### BH: Windows doesn't have the race condition between the write and=
 the
-     ###     rename that other operating systems might have. So allow wind=
ows
-     ###     to decide when it wants to perform the disk synchronization u=
sing
-     ###     the normal file locking and journaling filesystem rules.
-
-     ### Note that this function doesn't handle the rename, so we aren't e=
ven
-     ### sure that we really have to sync. */
-#ifndef WIN32
-  if (!err && nbytes > 0)
+  if (!err)
     err =3D svn_io_file_flush_to_disk(new_file, pool);
-#endif
=20
   return svn_error_trace(
                   svn_error_compose_create(err,

Mime
View raw message