]> git.wh0rd.org - dump.git/commitdiff
Improve level 1 mapdirs speed.
authorStelian Pop <stelian@popies.net>
Thu, 10 Jun 2010 12:01:30 +0000 (12:01 +0000)
committerStelian Pop <stelian@popies.net>
Thu, 10 Jun 2010 12:01:30 +0000 (12:01 +0000)
CHANGES
dump/traverse.c

diff --git a/CHANGES b/CHANGES
index 088e5bbf18bbbb3cdffaecab1c310de74c02bde9..9caf7d8e49c847f90b152d14c99cdabd9f2c6d01 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.311 2010/04/28 09:29:35 stelian Exp $
+$Id: CHANGES,v 1.312 2010/06/10 12:01:30 stelian Exp $
 
 Changes between versions 0.4b42 and 0.4b43 (released ?????????????)
 ===================================================================
@@ -43,6 +43,10 @@ Changes between versions 0.4b42 and 0.4b43 (released ?????????????)
        huge backups. Thanks to Steve Bonds <sbonds@users.sourceforge.net>
        for the bug report and tests. (Sourceforge bug #2987758)
 
+10.    Improve level 1 dump speed by rearanging the "mapdirs" code.
+       Thanks to Andreas Kies <andikies@t-online.de> for finding the
+       bottleneck and sending a patch.
+
 Changes between versions 0.4b41 and 0.4b42 (released June 18, 2009)
 ===================================================================
 
index 491d43ad28169b5b949817d656ed9398b2351348..0a394aea1c304c3ab4ee66125639fb87ee2341b2 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: traverse.c,v 1.69 2010/04/28 09:29:50 stelian Exp $";
+       "$Id: traverse.c,v 1.70 2010/06/10 12:01:30 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -574,9 +574,10 @@ mapdirs(dump_ino_t maxino, long long *tapesize)
                 * in usedinomap, but we have to go through it anyway 
                 * to propagate the nodump attribute.
                 */
+               if ((isdir & 1) == 0)
+                       continue;
                nodump = (TSTINO(ino, usedinomap) == 0);
-               if ((isdir & 1) == 0 ||
-                   (TSTINO(ino, dumpinomap) && nodump == 0))
+               if (TSTINO(ino, dumpinomap) && nodump == 0)
                        continue;
                dp = getino(ino);
 #ifdef __linux__