From 2359fe7e917ea8a52c5d523c77d29bddf6f82fce Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Mon, 6 Dec 2010 14:26:50 +0000 Subject: [PATCH] Fix restoring of files splitted on several volumes and starting on 2nd or later tapes. --- CHANGES | 7 ++++++- restore/restore.c | 9 +++++---- restore/tape.c | 7 +++++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 1672554..c3ac8f8 100644 --- 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 ?????????????) 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) =================================================================== diff --git a/restore/restore.c b/restore/restore.c index 780fd76..c773d90 100644 --- a/restore/restore.c +++ b/restore/restore.c @@ -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 @@ -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); diff --git a/restore/tape.c b/restore/tape.c index 45d156f..4710f88 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -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 @@ -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; -- 2.39.5