rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] More on failures to SMB-mounted disk


From: Ben Escoto
Subject: Re: [rdiff-backup-users] More on failures to SMB-mounted disk
Date: Thu, 03 Apr 2003 16:58:01 -0800

>>>>> "KE" == Keith Edmunds <address@hidden>
>>>>> wrote the following on Thu, 3 Apr 2003 20:01:00 +0100

  KE> It was a regular file. I've just tried it with a directory, and
  KE> it fails:
    ...
  KE> OSError: [Errno 22] Invalid argument

Ok, so that was at least one problem.  Try these patches:

--- Main.py     21 Mar 2003 17:48:06 -0000      1.30
+++ Main.py     4 Apr 2003 00:52:34 -0000       1.31
@@ -149,6 +149,7 @@
                        Globals.set('quoting_enabled', 1)
                        Globals.set('preserve_hardlinks', 0)
                        Globals.set('change_ownership', 0)
+                       Globals.set('fsync_directories', 0)
                else: Log.FatalError("Unknown option %s" % opt)
 
 def isincfilename(path):

--- Globals.py  15 Mar 2003 19:30:08 -0000      1.17
+++ Globals.py  4 Apr 2003 00:52:34 -0000       1.18
@@ -176,6 +176,10 @@
 # the man page under --no-compare-inode for more information.
 compare_inode = 1
 
+# If set, directories can be fsync'd just like normal files, to
+# guarantee that any changes have been committed to disk.
+fsync_directories = 1
+
 
 def get(name):
        """Return the value of something in this module"""

--- rpath.py    15 Mar 2003 19:30:08 -0000      1.40
+++ rpath.py    4 Apr 2003 00:52:34 -0000       1.41
@@ -908,7 +908,7 @@
        def fsync_with_dir(self, fp = None):
                """fsync self and directory self is under"""
                self.fsync(fp)
-               self.get_parent_rp().fsync()
+               if Globals.fsync_directories: self.get_parent_rp().fsync()
 
        def sync_delete(self):
                """Delete self with sync to guarantee completion

(also at:

http://savannah.nongnu.org/cgi-bin/viewcvs/rdiff-backup/rdiff-backup/rdiff_backup/Main.py.diff?r1=1.30&r2=1.31
http://savannah.nongnu.org/cgi-bin/viewcvs/rdiff-backup/rdiff-backup/rdiff_backup/rpath.py.diff?r1=1.40&r2=1.41
http://savannah.nongnu.org/cgi-bin/viewcvs/rdiff-backup/rdiff-backup/rdiff_backup/Globals.py.diff?r1=1.17&r2=1.18

) and see if they help.


-- 
Ben Escoto

Attachment: pgpUAR2rhzJaZ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]