Subject: Re: Why my life is sucking.
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Dean Huxley <dean@huxley.org>
List: current-users
Date: 01/16/2001 16:15:20
Manuel Bouyer <bouyer@antioche.lip6.fr> wrote:
> On Mon, Jan 15, 2001 at 03:18:15PM -0700, Herb Peyerl wrote:
> > Greg Oster suggested my problems with dump/restore leaving out files might
> > be related to the files that have been left out are all ones that have hard
> > links.  ie: mount_ufs, newfs, swapctl, swapon, etc.
> 
> I can't reproduce this either ...

Enami was right when he said "it looks like it's a getvol(0) in createfiles()".

The code that causes restore to panic is:
                /*
                 * Reject any volumes with inodes greater
                 * than the last one needed
                 */
                while (curfile.ino > last) {
                        curfile.action = SKIP;
                        getvol((long)0);		<- XXX
                        skipmaps();
                        skipdirs();
                }

(getvol calls panic if it's parameter is zero and input is from a pipe)

With some debug statements Herb and I found that when the XXX line was
reached:
	first=2642949
	last=4291799
	curfile.ino=11198465
	maxino=11190290
     
Note that curfile.ino is greater than maxino, which probably isn't
supposed to happen.  Dump is apparently dumping a file with an
inode greater than the maximum given in the dump header.  Could this
be caused by a file created in between the directory traversal and
file dumping? perhaps the temp file created by restore in /tmp?

I think other people have reported restore prompting for additional
tapes when the backup only created one originally.  This could be
the same bug...

I'm not sure what is the best way to fix this.  Certainly getvol(0)
should never be called if the input is a pipe.  Also something seems
wrong with dump giving inodes greater than maxino.

Any ideas, anyone?