From f34aca37d19fe46de9acb22249565dfb6491ab2f Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Tue, 2 Nov 1999 09:35:55 +0000 Subject: [PATCH] Waitpid problem with external RSH. Ext2fs_llseek instead of llseek. Removed CVS Id from autoconf files. --- CHANGES | 9 ++++++--- KNOWNBUGS | 18 +++++++++--------- MCONFIG.in | 2 -- Makefile.in | 1 - TODO | 5 +++-- acconfig.h | 2 -- common/dumprmt.c | 5 +++-- configure.in | 2 -- dump/tape.c | 6 ++++-- dump/traverse.c | 11 +++++------ 10 files changed, 30 insertions(+), 31 deletions(-) diff --git a/CHANGES b/CHANGES index 607a400..6b8c025 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.10 1999/10/31 19:48:25 tiniou Exp $ +$Id: CHANGES,v 1.11 1999/11/02 09:35:55 tiniou Exp $ Changes between versions 0.4b7 and 0.4b8 (released ???????????????) =================================================================== @@ -17,12 +17,15 @@ Changes between versions 0.4b7 and 0.4b8 (released ???????????????) contain them :(. Thanks to Eric Maisonobe for submitting the bug report. -5. Added the RSH environment variable in order to be able to +5. Use ext2fs_llseek instead of llseek. With recent e2fsprogs + this should enable dumping big (huge) filesystems. + +6. Added the RSH environment variable in order to be able to use a rsh replacement like ssh when doing remote backups (and bypass the security limitations of rcmd). Now you can do remote backups without being root (or making dump setuid root). -6. Modified again the way dumpdates works. For incremental dumps, +7. Modified again the way dumpdates works. For incremental dumps, we need to read dumpdates even if we are not using 'u' option. Thanks to Bdale Garbee for his ideas on how this should work. diff --git a/KNOWNBUGS b/KNOWNBUGS index 6b06386..01e8b72 100644 --- a/KNOWNBUGS +++ b/KNOWNBUGS @@ -1,17 +1,17 @@ -$Id: KNOWNBUGS,v 1.3 1999/10/11 13:31:03 stelian Exp $ +$Id: KNOWNBUGS,v 1.4 1999/11/02 09:35:55 tiniou Exp $ Known bugs and limitations of the dump/restore port =================================================== -1. Multi-volume does not work: restore does not succeeds in - resynchronizing itself on a multi-volume dump. Thus, some files are - not restored. - - Update: this is fixed in 4.0b5, needs succes reports! - -2. I have tried to minimize changes in the BSD source and some parts +1. I have tried to minimize changes in the BSD source and some parts may look ugly. dump/tape.c is really awfull but this is pure BSD code :-) Maybe, I should replace it with a simpler and cleaner version. -3. Kerberos mode is _NOT_ tested. +2. Kerberos mode is _NOT_ tested. + +3. Some users related possible problems when dumping large, + active (mounted) filesystems. The problems are reported as + lseek and read error messages (with a negative count). If + you encounter this kind of problems, please report them + to the author. diff --git a/MCONFIG.in b/MCONFIG.in index abbb434..e4e91d7 100644 --- a/MCONFIG.in +++ b/MCONFIG.in @@ -1,5 +1,3 @@ -# $Id: MCONFIG.in,v 1.5 1999/10/13 09:57:12 stelian Exp $ - VPATH= $(srcdir) top_builddir= @top_builddir@ diff --git a/Makefile.in b/Makefile.in index deb2896..34152c7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,3 @@ -# $Id: Makefile.in,v 1.3 1999/10/11 13:31:03 stelian Exp $ srcdir= @srcdir@ top_srcdir= @top_srcdir@ diff --git a/TODO b/TODO index dfc0672..2b3cc07 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -$Id: TODO,v 1.4 1999/10/11 13:31:04 stelian Exp $ +$Id: TODO,v 1.5 1999/11/02 09:35:55 tiniou Exp $ 1. Make dump honor the no-dump attribute on directories. Currently, it honours it only on files. This means that a directory flagged with @@ -17,7 +17,8 @@ $Id: TODO,v 1.4 1999/10/11 13:31:04 stelian Exp $ was ported from *BSD and was not tested - in fact, this wasn't even compiled in!). Need success reports for this. -6. Explore and correct dump problems on a 4GB+ filesystem. +6. Explore and correct dump problems on a 4GB+ active + filesystem (lseek/read negative count). 7. Clean-up the code by removing all those #ifdef _BSD, since nobody would ever re-compile this on a BSD system. diff --git a/acconfig.h b/acconfig.h index 28e3ed8..761eb13 100644 --- a/acconfig.h +++ b/acconfig.h @@ -1,5 +1,3 @@ -/* $Id: acconfig.h,v 1.2 1999/10/11 13:31:04 stelian Exp $ */ - /* Define to __s64 if does not define */ #undef quad_t diff --git a/common/dumprmt.c b/common/dumprmt.c index db18d32..5f53079 100644 --- a/common/dumprmt.c +++ b/common/dumprmt.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: dumprmt.c,v 1.7 1999/10/30 22:55:50 tiniou Exp $"; + "$Id: dumprmt.c,v 1.8 1999/11/02 09:35:56 tiniou Exp $"; #endif /* not lint */ #ifdef __linux__ @@ -97,6 +97,7 @@ static const char rcsid[] = static int rmtstate = TS_CLOSED; static int tormtape = -1; static int fromrmtape = -1; +int rshpid = -1; static const char *rmtpeer = 0; static int okname __P((const char *)); @@ -203,7 +204,7 @@ rmtgetconn(void) rshcmd[4] = rmt; rshcmd[5] = NULL; - if (piped_child(rshcmd) < 0) { + if ((rshpid = piped_child(rshcmd)) < 0) { msg("cannot open connection\n"); return 0; } diff --git a/configure.in b/configure.in index 5071e94..a66f628 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,3 @@ -dnl $Id: configure.in,v 1.5 1999/10/11 13:31:04 stelian Exp $ - AC_INIT(dump/dump.h) MCONFIG=./MCONFIG diff --git a/dump/tape.c b/dump/tape.c index b0d7fd4..1b28c41 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.6 1999/10/13 09:57:20 stelian Exp $"; + "$Id: tape.c,v 1.7 1999/11/02 09:35:56 tiniou Exp $"; #endif /* not lint */ #ifdef __linux__ @@ -95,6 +95,7 @@ extern int ntrec; /* blocking factor on tape */ extern int cartridge; extern char *host; char *nexttape; +extern pid_t rshpid; static ssize_t atomic_read __P((int, void *, size_t)); static ssize_t atomic_write __P((int, const void *, size_t)); @@ -661,7 +662,8 @@ restore_check_point: tapeno+1, parentpid, childpid); #endif /* TDEBUG */ while ((waitpid = wait(&status)) != childpid) - msg("Parent %d waiting for child %d has another child %d return\n", + if (waitpid != rshpid) + msg("Parent %d waiting for child %d has another child %d return\n", parentpid, childpid, waitpid); if (status & 0xFF) { msg("Child %d returns LOB status %o\n", diff --git a/dump/traverse.c b/dump/traverse.c index 0865527..d3f99bf 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.6 1999/10/13 09:57:20 stelian Exp $"; + "$Id: traverse.c,v 1.7 1999/11/02 09:35:56 tiniou Exp $"; #endif /* not lint */ #include @@ -93,7 +93,6 @@ typedef long fsizeT; #ifdef __linux__ static int searchdir __P((struct ext2_dir_entry *dp, int offset, int blocksize, char *buf, void *private)); -loff_t llseek (int fd, loff_t offset, int origin); #else static int dirindir __P((ino_t ino, daddr_t blkno, int level, long *size)); static void dmpindir __P((ino_t ino, daddr_t blk, int level, fsizeT *size)); @@ -1013,8 +1012,8 @@ bread(daddr_t blkno, char *buf, int size) loop: #ifdef __linux__ - if (llseek(diskfd, ((ext2_loff_t)blkno << dev_bshift), 0) != - ((ext2_loff_t)blkno << dev_bshift)) + if (ext2fs_llseek(diskfd, (((ext2_loff_t)blkno) << dev_bshift), 0) != + (((ext2_loff_t)blkno) << dev_bshift)) #else if (lseek(diskfd, ((off_t)blkno << dev_bshift), 0) != ((off_t)blkno << dev_bshift)) @@ -1059,8 +1058,8 @@ loop: memset(buf, 0, size); for (i = 0; i < size; i += dev_bsize, buf += dev_bsize, blkno++) { #ifdef __linux__ - if (llseek(diskfd, ((ext2_loff_t)blkno << dev_bshift), 0) != - ((ext2_loff_t)blkno << dev_bshift)) + if (ext2fs_llseek(diskfd, (((ext2_loff_t)blkno) << dev_bshift), 0) != + (((ext2_loff_t)blkno) << dev_bshift)) #else if (lseek(diskfd, ((off_t)blkno << dev_bshift), 0) != ((off_t)blkno << dev_bshift)) -- 2.39.2