From b8f7cbe65e70f2ec792c447995ba00ca360ec0c9 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Wed, 18 Jul 2001 13:12:33 +0000 Subject: [PATCH] QFA fixes. --- CHANGES | 6 +++++- dump/dump.8.in | 14 +++++++++++++- dump/dump.h | 3 ++- dump/main.c | 5 ++++- dump/tape.c | 5 +++-- restore/main.c | 4 ++-- restore/restore.8.in | 14 +++++++++++++- 7 files changed, 42 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 3740d56..9cae80d 100644 --- 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 + , and some recommendations for QFA uses in + the man pages. + Changes between versions 0.4b21 and 0.4b22 (released May 12, 2001) ================================================================== diff --git a/dump/dump.8.in b/dump/dump.8.in index 5a1dc75..a3763a5 100644 --- a/dump/dump.8.in +++ b/dump/dump.8.in @@ -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, diff --git a/dump/dump.h b/dump/dump.h index 2a6020c..2f570ec 100644 --- a/dump/dump.h +++ b/dump/dump.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - AlcĂ´ve , 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 */ diff --git a/dump/main.c b/dump/main.c index 5953f39..0d1f4fd 100644 --- a/dump/main.c +++ b/dump/main.c @@ -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 @@ -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)); diff --git a/dump/tape.c b/dump/tape.c index 5666b39..a0910f4 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -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 @@ -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) { diff --git a/restore/main.c b/restore/main.c index 5892252..8b6b08e 100644 --- a/restore/main.c +++ b/restore/main.c @@ -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 @@ -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]", diff --git a/restore/restore.8.in b/restore/restore.8.in index 7faa54a..96d91a8 100644 --- a/restore/restore.8.in +++ b/restore/restore.8.in @@ -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 -- 2.39.2