]> git.wh0rd.org - dump.git/commitdiff
QFA fixes.
authorStelian Pop <stelian@popies.net>
Wed, 18 Jul 2001 13:12:33 +0000 (13:12 +0000)
committerStelian Pop <stelian@popies.net>
Wed, 18 Jul 2001 13:12:33 +0000 (13:12 +0000)
CHANGES
dump/dump.8.in
dump/dump.h
dump/main.c
dump/tape.c
restore/main.c
restore/restore.8.in

diff --git a/CHANGES b/CHANGES
index 3740d568e193a267e2adda650a0a9fee9787eb7d..9cae80d4c246bd2723ff34545900173ea8c81820 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.122 2001/07/18 12:54:06 stelian Exp $
+$Id: CHANGES,v 1.123 2001/07/18 13:12:33 stelian Exp $
 
 Changes between versions 0.4b22 and 0.4b23 (released ????????????)
 ==================================================================
@@ -35,6 +35,10 @@ Changes between versions 0.4b22 and 0.4b23 (released ????????????)
        tape changers for example. See the restore man page for the
        script parameters and return codes.
 
+9.     Small fix for the QFA routines provided by Uwe Gohlke 
+       <uwe@ugsoft.de>, and some recommendations for QFA uses in
+       the man pages.
+
 Changes between versions 0.4b21 and 0.4b22 (released May 12, 2001)
 ==================================================================
 
index 5a1dc751b9a7a72758e70fcb924ee4e928ce3e3d..a3763a52ac352d83f7be423d94f55dceb8705231 100644 (file)
@@ -30,7 +30,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\"    $Id: dump.8.in,v 1.28 2001/07/18 12:54:06 stelian Exp $
+.\"    $Id: dump.8.in,v 1.29 2001/07/18 13:12:33 stelian Exp $
 .\"
 .Dd __DATE__
 .Dt DUMP 8
@@ -251,6 +251,18 @@ which is used by restore (if called with parameter Q and the filename)
 to directly position the tape at the file restore is currently working
 on.  This saves hours when restoring single files from large backups,
 saves the tapes and the drive's head.
+.Pp
+It is recommended to set up the st driver to return logical tape 
+positions rather than physical before calling dump/restore with 
+parameter Q.  Since not all tape devices support physical tape 
+positions those tape devices return an error during dump/restore when
+the st driver is set to the default physical setting.
+Please see the st man page, option MTSETDRVBUFFER, or the mt man
+page, on how to set the driver to return logical tape positions.
+.Pp
+Before calling restore with parameter Q, always make sure the st
+driver is set to return the same type of tape position used during the 
+call to dump. Otherwise restore may be confused.
 .It Fl s Ar feet
 Attempt to calculate the amount of tape needed at a particular density.
 If this amount is exceeded,
index 2a6020c89b0225ad3728d38296cb58855711a7a0..2f570ecb977b06b8858c744af3e1ed1ea4842b97 100644 (file)
@@ -5,7 +5,7 @@
  *     Stelian Pop <pop@noos.fr>, 1999-2000
  *     Stelian Pop <pop@noos.fr> - AlcĂ´ve <www.alcove.fr>, 2000
  *
- *     $Id: dump.h,v 1.25 2001/07/18 09:50:48 stelian Exp $
+ *     $Id: dump.h,v 1.26 2001/07/18 13:12:33 stelian Exp $
  */
 
 /*-
@@ -115,6 +115,7 @@ int tp_bshift;      /* log2(TP_BSIZE) */
 int    gTapeposfd;
 char   *gTapeposfile;
 char   gTps[255];
+int32_t        gThisDumpDate;
 int    GetTapePos __P((long *pos));
 #endif /* USE_QFA */
 
index 5953f3941f2a866f6eabff7100e4b17cf2845dcb..0d1f4fd19adb082e7ec6ec376db9ce1b6009f15a 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.51 2001/07/18 09:50:48 stelian Exp $";
+       "$Id: main.c,v 1.52 2001/07/18 13:12:33 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -528,6 +528,9 @@ main(int argc, char *argv[])
 
                msg("Date of this level %c dump: %s", level,
                    ctime4(&spcl.c_date));
+#ifdef USE_QFA
+               gThisDumpDate = spcl.c_date;
+#endif
                if (spcl.c_ddate)
                        msg("Date of last level %c dump: %s", lastlevel,
                            ctime4(&spcl.c_ddate));
index 5666b39329d2e774ae52ee64e9c40eeec40f1a85..a0910f4f5d5943993d3b7d30f5f1b829e773c169 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.50 2001/07/18 12:54:06 stelian Exp $";
+       "$Id: tape.c,v 1.51 2001/07/18 13:12:33 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -1146,7 +1146,8 @@ doslave(int cmd, int slave_number)
                        uspclptr = (union u_spcl *)&slp->tblock[0];
                        spclptr = &uspclptr->s_spcl;
                        if ((spclptr->c_magic == NFS_MAGIC) && 
-                           (spclptr->c_type == TS_INODE)) {
+                           (spclptr->c_type == TS_INODE) &&
+                           (spclptr->c_date == gThisDumpDate)) {
                                /* if an error occured previously don't
                                 * try again */
                                if (gtperr == 0) {
index 5892252a5ba75b97e8a6df6b3eb62923b50a37f3..8b6b08e0a57b7b4cad9ccf47698771a284e26749 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.25 2001/07/18 12:54:06 stelian Exp $";
+       "$Id: main.c,v 1.26 2001/07/18 13:12:33 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -505,7 +505,7 @@ usage(void)
 
        (void)fprintf(stderr,
          "usage:\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n",
-         __progname, " -C [-c" kerbflag "Mvy] [-b blocksize] [-D filesystem] [-f file] [-F script ] [-s fileno]",
+         __progname, " -C [-c" kerbflag "Mvy] [-b blocksize] [-D filesystem] [-f file] [-F script] [-s fileno]",
          __progname, " -i [-ch" kerbflag "mMuvy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno]",
          __progname, " -r [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
          __progname, " -R [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
index 7faa54a3291dca41001e47025f59276f72699f4e..96d91a8c164c969f94e42a03c63c557464f41c30 100644 (file)
@@ -29,7 +29,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\"    $Id: restore.8.in,v 1.15 2001/07/18 12:54:06 stelian Exp $
+.\"    $Id: restore.8.in,v 1.16 2001/07/18 13:12:33 stelian Exp $
 .\"
 .Dd __DATE__
 .Dt RESTORE 8
@@ -393,6 +393,18 @@ Use the file
 .Ar file
 in order to read tape position as stored using the dump Quick File
 Access mode.
+.Pp
+It is recommended to set up the st driver to return logical tape 
+positions rather than physical before calling dump/restore with 
+parameter Q.  Since not all tape devices support physical tape 
+positions those tape devices return an error during dump/restore when
+the st driver is set to the default physical setting.
+Please see the st man page, option MTSETDRVBUFFER, or the mt man
+page, on how to set the driver to return logical tape positions.
+.Pp
+Before calling restore with parameter Q, always make sure the st
+driver is set to return the same type of tape position used during the 
+call to dump. Otherwise restore may be confused.
 .It Fl s Ar fileno
 Read from the specified
 .Ar fileno