From owner-freebsd-stable Wed Apr 18 18: 0:29 2001 Delivered-To: freebsd-stable@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 8D7BA37B423 for ; Wed, 18 Apr 2001 18:00:26 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from spike.unixfreak.org (spike [63.198.170.139]) by bazooka.unixfreak.org (Postfix) with ESMTP id B88293E09; Wed, 18 Apr 2001 18:00:25 -0700 (PDT) To: Jordan Hubbard Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Dump problem In-Reply-To: <20010418175053L.jkh@osd.bsdi.com>; from jkh@osd.bsdi.com on "Wed, 18 Apr 2001 17:50:53 -0700" Date: Wed, 18 Apr 2001 18:00:25 -0700 From: Dima Dorfman Message-Id: <20010419010025.B88293E09@bazooka.unixfreak.org> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jordan Hubbard writes: > This close to release, I just want it fixed, we can argue about > process later. :) I'm sorry if I sounded like I wanted to argue about it. I'm not complaining. Please feel free to commit the patch to -current and -stable, find someone else to do it, or failing that hand me approval to do it in both branches. It seems it fixes the problem for everyone who has tried it. It's attached below for your convenience. Regards, Dima Dorfman dima@unixfreak.org Index: traverse.c =================================================================== RCS file: /st/src/FreeBSD/src/sbin/dump/traverse.c,v retrieving revision 1.12 diff -u -r1.12 traverse.c --- traverse.c 2001/03/03 11:35:50 1.12 +++ traverse.c 2001/04/07 22:50:35 @@ -155,13 +155,15 @@ if ((mode = (dp->di_mode & IFMT)) == 0) continue; /* - * All dirs go in dumpdirmap; only inodes that are to - * be dumped go in usedinomap and dumpinomap, however. + * Everything must go in usedinomap so that a check + * for "in dumpdirmap but not in usedinomap" to detect + * dirs with nodump set has a chance of succeeding + * (this is used in mapdirs()). */ + SETINO(ino, usedinomap); if (mode == IFDIR) SETINO(ino, dumpdirmap); if (WANTTODUMP(dp)) { - SETINO(ino, usedinomap); SETINO(ino, dumpinomap); if (mode != IFREG && mode != IFDIR && mode != IFLNK) *tapesize += 1; @@ -169,8 +171,11 @@ *tapesize += blockest(dp); continue; } - if (mode == IFDIR) + if (mode == IFDIR) { + if (!nonodump && (dp->di_flags & UF_NODUMP)) + CLRINO(ino, usedinomap); anydirskipped = 1; + } } /* * Restore gets very upset if the root is not dumped, @@ -218,7 +223,7 @@ * it isn't in usedinomap, we have to go through it to * propagate the nodump flag. */ - nodump = (TSTINO(ino, usedinomap) == 0); + nodump = !nonodump && (TSTINO(ino, usedinomap) == 0); if ((isdir & 1) == 0 || (TSTINO(ino, dumpinomap) && !nodump)) continue; dp = getino(ino); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message