From 7af2fada292acbfb50d441c4be192690dff40283 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Thu, 10 Jun 2010 12:01:30 +0000 Subject: [PATCH] Improve level 1 mapdirs speed. --- CHANGES | 6 +++++- dump/traverse.c | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 088e5bb..9caf7d8 100644 --- 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 for the bug report and tests. (Sourceforge bug #2987758) +10. Improve level 1 dump speed by rearanging the "mapdirs" code. + Thanks to Andreas Kies for finding the + bottleneck and sending a patch. + Changes between versions 0.4b41 and 0.4b42 (released June 18, 2009) =================================================================== diff --git a/dump/traverse.c b/dump/traverse.c index 491d43a..0a394ae 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -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 @@ -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__ -- 2.39.5