Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2002 04:06:58 -0800 (PST)
From:      Ian Dowse <iedowse@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sbin/restore tape.c
Message-ID:  <200202131206.g1DC6wp06177@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
iedowse     2002/02/13 04:06:58 PST

  Modified files:
    sbin/restore         tape.c 
  Log:
  Fix a number of long-standing restore bugs in tape.c, mainly relating
  to multi-volume restores:
   - In findinode(), keep a copy of header->c_type so that we don't
     exit the do-while loop until we have processed the current header.
     Exiting too early leaves curfile.ino set to 0, which confuses
     the logic in createfiles(), so multi-volume restores with the
     'x' command don't work if you follow the instructions and supply
     the tapes in reverse order.  This appears to have been broken
     by CSRG revision 5.33 tape.c (Oct 1992).
   - The logic in getvol() for deciding how many records to skip after
     the volume header was confused; sometimes it would skip too few
     records and sometimes too many, leading to "resync restore"
     warnings and missing files. Skip to the next header only when
     the current action is not `USING'. Work around a dump bug that
     sets c_count incorrectly in the volume header of the first tape.
     Some of the problems here date back to at least 1991.
   - Back out revision 1.23. This appeared to avoid warnings about
     missing files in the 'rN' verification case, but it made the
     problems with the 'x' command worse by stopping getvol() from
     even attempting to find the first inode number on the newly
     inserted tape. The bug it addressed is fixed by correcting the
     skipping logic as described above.
   - Save the value of `tpblksread' in case the wrong volume is
     supplied, because it is incremented each time we read a volume
     header. We already saved `blksread' for the same reson.
  
  Revision  Changes    Path
  1.27      +19 -18    src/sbin/restore/tape.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202131206.g1DC6wp06177>