From 016298551c086bb18a68c41ab1ad2c80bc0f4005 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Wed, 5 Dec 2001 20:42:52 +0000 Subject: Files in subdirectories of directories that have the nodump flag set are sometimes incorrectly being dumped. The problem arises because the subdirectory only gets its entry cleared from usedinomap if it is also present in dumpinomap, and it is the absence of a directory in usedinomap that internally indicates that the directory is under the effects of UF_NODUMP (either directly or inherited). PR: 32414 Submitted by: David C Lawrence --- sbin/dump/traverse.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sbin') diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 6ed98adc629b..f948dd220737 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -340,12 +340,15 @@ searchdir(ino, blkno, size, filesize, tapesize, nodump) ip = getino(dp->d_ino); if (TSTINO(dp->d_ino, dumpinomap)) { CLRINO(dp->d_ino, dumpinomap); - CLRINO(dp->d_ino, usedinomap); *tapesize -= blockest(ip); } - /* Add back to dumpdirmap to propagate nodump. */ + /* + * Add back to dumpdirmap and remove from usedinomap + * to propagate nodump. + */ if ((ip->di_mode & IFMT) == IFDIR) { SETINO(dp->d_ino, dumpdirmap); + CLRINO(dp->d_ino, usedinomap); ret |= HASSUBDIRS; } } else { -- cgit v1.2.3