Automatic `nodump' flag?

Kirk McKusick mckusick at mckusick.com
Wed Jan 30 17:01:18 PST 2008


> Date: Wed, 30 Jan 2008 16:13:54 -0600
> From: Barry Pederson <bp at barryp.org>
> To: Kirk McKusick <mckusick at mckusick.com>
> CC: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <des at des.no>, questions at freebsd.org,
>         fs at freebsd.org
> Subject: Re: Automatic `nodump' flag?
> X-ASK-Info: Message Queued (2008/01/30 14:14:17)
> X-ASK-Info: Confirmed by User (2008/01/30 16:37:01)
> 
> Kirk McKusick wrote:
> 
> > The dump program runs on the raw disk partition dumping sequentially
> > by inode number. So, it has no idea of the file-tree hierarchy. 
> 
> I was just looking at the source to dump, specifically traverse.c and 
> from what I can see, doesn't dump pass #2 scan through all directories 
> and then in the searchdir() function remove a directory's children from 
> the list of inodes to backup if the directory has the nodump flag?
> 
> ---------
> 414                 if (nodump) {
> 415                         ip = getino(dp->d_ino, &mode);
> 416                         if (TSTINO(dp->d_ino, dumpinomap)) {
> 417                                 CLRINO(dp->d_ino, dumpinomap);
> 418                                 *tapesize -= blockest(ip);
> ---------
> 
> 	Barry

You are completely correct. This does prune out everything below a
directory marked `nodump' even if those files are not also marked
`nodump'. Note that by default, level 0 dumps will ignore the
`nodump' flag. You have to use `-h 0' if you want a level 0 dump
to honor the `nodump' flag.

You would think I would remember code that I wrote (though in my
defense it was written over 20 years ago :-)

	Kirk McKusick


More information about the freebsd-fs mailing list