Purdue-dump-mods -- dump patches for active filesystems [alt.sys.sun]
Dieter Muller
dworkin at salgado.Solbourne.COM
Tue Dec 12 07:03:48 AEST 1989
Archive-name: Purdue-dump-mods
Original-posting-by: dworkin at salgado.Solbourne.COM (Dieter Muller)
Original-subject: The Purdue dump mods (was Question about dumps on Suns)
Reposted-by: emv at math.lsa.umich.edu (Edward Vielmetti)
[This is an experimental alt.sources re-posting from the newsgroup(s)
alt.sys.sun. Comments on this service to emv at math.lsa.umich.edu
(Edward Vielmetti).]
OK, I've gotten enough requests to the effect of `where do we find
the mods' that I'm posting them. Some commentary about the diffs
that follow:
o the references to New Mexico Tech are spurious and can
be completely ignored. That's where I was when I first
acquired the diffs, and had to re-create them.
o the changes are always active. It's fairly simple to
make them dependent on a command-line switch. This
is left as an exercise for the reader.
o no reporting is generated. Again, it's pretty straight-
forward to generate comments about `skipping inode X during
pass N'.
Installation instructions:
o feed this message to patch(1) (by Larry Wall). If you
don't have it, either get it from your favorite anonymous
ftp/uucp site, or fold in the changes by hand. It should
be pretty obvious what's going on.
o modify the Makefile: include a `-DPURDUE_EE' in the CFLAGS
macro.
o depending on exactly which variety of dump you have, you want
to `make all' or `make rdump'.
o copy the resulting executable to /usr/etc/dump
o make sure there's a link (firmness doesn't matter) from
/usr/etc/rdump to /usr/etc/dump. Your system may have
everything in /etc, not /usr/etc.
o have fun with your new dump (just the thing for a Saturday night)
Legal CYA claptrap:
o these mods have been in use for several years at various
sites. However, I make no guarantees about them. Specifically,
there is no implied merchantability, and it's theoretically
possible that using the mods under extreme conditions may
cause your system to jump up on the desk, sing Yankee Doodle
Dandy, and disappear in a puff of logic. Not real likely,
though.
o Even more important, there is no connection between these
mods and my current employer (Solbourne). If these break
something, I'd personally like to hear about it, but
Solbourne wouldn't. You'd probably get a response to the
effect of `Huh? What *are* you talking about?'.
I strongly urge you to study the mods carefully before applying
them, to convince yourself of exactly what they do. If anyone
needs the theory explained, feel free to e-mail. Depending on how
things are going that day, I may even answer.
Share and Enjoy.
Dworkin
================================================================
*** dumpmain.c.orig Wed Aug 17 00:52:49 1988
--- dumpmain.c Wed Aug 17 00:52:36 1988
***************
*** 6,17 ****
#ifndef lint
/* dumpmain.c 5.4 (Berkeley) 5/28/86 */
! static char sccsid [] = "@(#)dumpmain.c 1.2 5/16/88 New Mexico Tech\n";
#endif not lint
#include "dump.h"
int notify = 0; /* notify operator flag */
int blockswritten = 0; /* number of blocks written on current tape */
int tapeno = 0; /* current tape number */
--- 6,20 ----
#ifndef lint
/* dumpmain.c 5.4 (Berkeley) 5/28/86 */
! static char sccsid [] = "@(#)dumpmain.c 1.3 5/16/88 New Mexico Tech\n";
#endif not lint
#include "dump.h"
+ #if PURDUE_EE
+ int filepass;
+ #endif
int notify = 0; /* notify operator flag */
int blockswritten = 0; /* number of blocks written on current tape */
int tapeno = 0; /* current tape number */
***************
*** 294,300 ****
--- 297,309 ----
pass(dirdump, dirmap);
msg("dumping (Pass IV) [regular files]\n");
+ #if PURDUE_EE
+ filepass = 1;
+ #endif
pass(dump, nodmap);
+ #if PURDUE_EE
+ filepass = 0;
+ #endif
spcl.c_type = TS_END;
#ifndef RDUMP
*** dumptraverse.c.orig Wed Aug 17 00:57:34 1988
--- dumptraverse.c Wed Aug 17 00:57:48 1988
***************
*** 6,14 ****
#ifndef lint
/* from dumptraverse.c 5.3 (Berkeley) 1/9/86 */
! static char sccsid [] = "@(#)dumptraverse.c 1.1 3/21/88 New Mexico Tech\n";
#endif not lint
#include "dump.h"
--- 6,17 ----
#ifndef lint
/* from dumptraverse.c 5.3 (Berkeley) 1/9/86 */
! static char sccsid [] = "@(#)dumptraverse.c 1.2 5/16/88 New Mexico Tech\n";
#endif not lint
+ #if PURDUE_EE
+ extern int filepass;
+ #endif
#include "dump.h"
***************
*** 47,52 ****
--- 50,62 ----
BIS(ino, dirmap);
if ((ip->di_mtime >= spcl.c_ddate || ip->di_ctime >= spcl.c_ddate) &&
!BIT(ino, nodmap)) {
+ #if PURDUE_EE
+ if (ip->di_mtime >= spcl.c_date || ip->di_ctime >= spcl.c_date) {
+ if (f != IFDIR) {
+ return;
+ }
+ }
+ #endif
BIS(ino, nodmap);
if (f != IFREG && f != IFDIR && f != IFLNK) {
esize += 1;
***************
*** 140,145 ****
--- 150,162 ----
i = ip->di_mode & IFMT;
if (i == 0) /* free inode */
return;
+ #if PURDUE_EE
+ if (ip->di_mtime >= spcl.c_date || ip->di_ctime >= spcl.c_date) {
+ if (filepass) {
+ return;
+ }
+ }
+ #endif
if ((i != IFDIR && i != IFREG && i != IFLNK) || ip->di_size == 0) {
spclrec();
return;
--
sophisticate: to alter deceptively; esp. ADULTERATE --Webster's 7th Collegiate
boulder!stan!dworkin dworkin%stan at boulder.colorado.edu dworkin at solbourne.com
Flamer's Hotline: (303) 678-4624 (1000 - 1800 Mountain Time)
More information about the Alt.sources
mailing list