Date: Fri, 16 Mar 2001 23:00:33 -0500 From: James Housley <jim@thehousleys.net> To: Dima Dorfman <dima@unixfreak.org> Cc: freebsd-arch@freebsd.org Subject: Re: Inherate nodump cause significant slow down of dump Message-ID: <3AB2E161.949AE10C@thehousleys.net> References: <20010317015657.C47D03E1E@bazooka.unixfreak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I see that my suggested code below won't work because we are pasring the
tree in inode number instead of a depth traversal of the tree. I know
with out inheriting the nodump flag the code would beable to read from
the disk much faster in sequential order. Maybe what we now need is a
second verion of mapfiles() that does a depth traversal of the tree iff
dump is called with -h. This will be quicker then the current if a
directory actually has the nodump flag set, but will be slower
(hopefully not much) if there is no nodump flag. With the depth
traversal processing can stop when a directory is found that is flaged
as no dump. A second copy of mapdirs() might also be needed.
Jim
>
> Why is a directory added without checking for the nodump flag? Because
> isn't then just removed later in mapdirs()? Wouldn't this work better?
> I don't fully understand all the code yet, but I am looking.
>
> /*
> * All dirs go in dumpdirmap; only inodes that are to
> * be dumped go in usedinomap and dumpinomap, however.
> */
> if (mode == IFDIR)
> - SETINO(ino, dumpdirmap);
> + if (WANTTODUMP(dp))
> + SETINO(ino, dumpdirmap);
> + else {
> + anydirskipped = 1;
> + continue;
> + }
> if (WANTTODUMP(dp)) {
> SETINO(ino, usedinomap);
> SETINO(ino, dumpinomap);
> if (mode != IFREG && mode != IFDIR && mode != IFLNK)
> *tapesize += 1;
> else
> *tapesize += blockest(dp);
> continue;
> }
> if (mode == IFDIR)
> anydirskipped = 1;
>
>
> Jim
--
/"\ ASCII Ribbon Campaign .
\ / - NO HTML/RTF in e-mail .
X - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org http://www.FreeBSD.org The Power to Serve
jim@TheHousleys.Net http://www.TheHousleys.net
---------------------------------------------------------------------
If it happens once, it's a bug.
If it happens twice, it's a feature.
If it happens more than twice, it's windows.
-- Luiz de Barros
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AB2E161.949AE10C>
