]> git.wh0rd.org - dump.git/commitdiff
Fix restoring of files splitted on several volumes and starting on 2nd or later tapes.
authorStelian Pop <stelian@popies.net>
Mon, 6 Dec 2010 14:26:50 +0000 (14:26 +0000)
committerStelian Pop <stelian@popies.net>
Mon, 6 Dec 2010 14:26:50 +0000 (14:26 +0000)
CHANGES
restore/restore.c
restore/tape.c

diff --git a/CHANGES b/CHANGES
index 167255487a93eb2fd63013d8e427b3b5b2098f29..c3ac8f8eb132447e7ab2dbe33241f924c4d2804e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.318 2010/12/06 14:13:59 stelian Exp $
+$Id: CHANGES,v 1.319 2010/12/06 14:26:50 stelian Exp $
 
 
 Changes between versions 0.4b43 and 0.4b44 (released ?????????????)
@@ -9,6 +9,11 @@ Changes between versions 0.4b43 and 0.4b44 (released ?????????????)
        <jgorig@users.sourceforge.net> for reporting the bug and
        submitting the patch.
 
+2.     Fix an issue with multi volume backups, which breaks
+       restoring of files which are splitted on two or more
+       volumes and are starting on 2nd tape or later (RedHat
+       bug #507948).
+
 Changes between versions 0.4b42 and 0.4b43 (released June 11, 2010)
 ===================================================================
 
index 780fd76f04bdd0a3d61297acf9719c0295a6a805..c773d9066f63a2de811133253ef0558537446ba7 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: restore.c,v 1.39 2010/03/22 16:08:10 stelian Exp $";
+       "$Id: restore.c,v 1.40 2010/12/06 14:26:50 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -904,14 +904,15 @@ createfiles(void)
        Vprintf(stdout, "Extract requested files\n");
        curfile.action = SKIP;
 #ifdef USE_QFA
-       if (tapeposflag)
-               curfile.ino = 0;
-       else
+       if (!tapeposflag) {
 #endif
                if (volinfo[1] == ROOTINO)
                        curfile.ino = 0;
                else
                        getvol((long)1);
+#ifdef USE_QFA
+       }
+#endif
        skipmaps();
        skipdirs();
        first = lowerbnd(ROOTINO);
index 45d156f5abd02dfeff2b2fd718f9daf7b29ff8f6..4710f889d1cdae269f1c3c586eb594cdc401c650 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.99 2010/06/11 11:19:17 stelian Exp $";
+       "$Id: tape.c,v 1.100 2010/12/06 14:26:51 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -3336,11 +3336,14 @@ ReReadInodeFromTape(dump_ino_t theino)
                cntloop++;
                gethead(&spcl);
        } while (!(spcl.c_inumber == theino && spcl.c_type == TS_INODE && spcl.c_date == dumpdate));
+
+       tpblksread = spcl.c_tapea + spcl.c_volume;
 #ifdef DEBUG_QFA
        fprintf(stderr, "DEBUG: %ld reads\n", cntloop);
        fprintf(stderr, "DEBUG: bufsize %ld\n", bufsize);
        fprintf(stderr, "DEBUG: ntrec %ld\n", ntrec);
-       fprintf(stderr, "DEBUG: %ld reads\n", cntloop);
+       fprintf(stderr, "DEBUG: tapea %d\n", spcl.c_tapea);
+       fprintf(stderr, "DEBUG: tpblksread %ld\n", tpblksread);
 #endif
        findinode(&spcl);
        noresyncmesg = 0;