]> git.wh0rd.org - dump.git/commitdiff
Dump accepts ext3 filesystems. Checking the superblock features. release_0_4b10
authorStelian Pop <stelian@popies.net>
Sun, 21 Nov 1999 02:24:45 +0000 (02:24 +0000)
committerStelian Pop <stelian@popies.net>
Sun, 21 Nov 1999 02:24:45 +0000 (02:24 +0000)
CHANGES
MCONFIG.in
THANKS
TODO
dump.lsm
dump.spec
dump/dump.h
dump/main.c
dump/tape.c
dump/traverse.c
rmt/rmt.c

diff --git a/CHANGES b/CHANGES
index 9448a0b871f084c5081d28be6465cb91e865f2a8..557acb1af2572e6560f72839f514a8ac680e512d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.17 1999/11/21 00:17:12 tiniou Exp $
+$Id: CHANGES,v 1.18 1999/11/21 02:24:45 tiniou Exp $
 
 Changes between versions 0.4b9 and 0.4b10 (released ???????????????)
 ====================================================================
 
 Changes between versions 0.4b9 and 0.4b10 (released ???????????????)
 ====================================================================
@@ -19,6 +19,16 @@ Changes between versions 0.4b9 and 0.4b10 (released ???????????????)
        has the nodump flag gets never dumped, regardless of its
        contents.
 
        has the nodump flag gets never dumped, regardless of its
        contents.
 
+4.     Integrate a patch from Jeremy Fitzhardinge <jeremy@goop.org>
+       which allows dump on an active ext3 filesystem. However, this
+       is a "quick and dirty" patch which enables backup of an ext3
+       filesystem through the ext2 compatibility (by ignoring the
+       NEEDS_RECOVERY bit). The journal file is not recognized and
+       it is dumped (it should not). 
+
+5.     Test the superblock compatibility flags when dumping, in order
+       to be sure that we know how to deal with specific features.
+
 Changes between versions 0.4b8 and 0.4b9 (released November 5, 1999)
 ====================================================================
 
 Changes between versions 0.4b8 and 0.4b9 (released November 5, 1999)
 ====================================================================
 
index 871a8d96ca4278b573d338cbf94c8ffbd695dfda..6f2a0fb6db2955a2852f8c9cd023e4ea209e9516 100644 (file)
@@ -2,8 +2,8 @@ VPATH=          $(srcdir)
 
 top_builddir=  @top_builddir@
 
 
 top_builddir=  @top_builddir@
 
-VERSION=       0.4b9
-DATE=          November 5, 1999
+VERSION=       0.4b10
+DATE=          November 21, 1999
 
 AR=            @AR@
 CC=            @CC@
 
 AR=            @AR@
 CC=            @CC@
diff --git a/THANKS b/THANKS
index 448efd08581252be14491a712e15da9ed65bf83b..b43b7b88e0c316dba9add2a685f8e71638a0fc2b 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.9 1999/11/17 22:46:40 tiniou Exp $
+$Id: THANKS,v 1.10 1999/11/21 02:24:45 tiniou Exp $
 
 Dump and restore were written by the people of the CSRG at the University
 of California, Berkeley.
 
 Dump and restore were written by the people of the CSRG at the University
 of California, Berkeley.
@@ -24,6 +24,7 @@ Here is a partial list of them (if I have forgotten someone, please complain):
 
 Stephen Carr           sgcarr@civeng.adelaide.edu.au
 Abhijit Dasgupta       abhijit@ans.net
 
 Stephen Carr           sgcarr@civeng.adelaide.edu.au
 Abhijit Dasgupta       abhijit@ans.net
+Jeremy Fitzhardinge    jeremy@goop.org
 Eirik Fuller           eirik@netcom.com
 Henry Katz             hkatz@hkatz.dialup.access.net
 Klaus Kudielka         kkudielk@cacofonix.nt.tuwien.ac.at
 Eirik Fuller           eirik@netcom.com
 Henry Katz             hkatz@hkatz.dialup.access.net
 Klaus Kudielka         kkudielk@cacofonix.nt.tuwien.ac.at
diff --git a/TODO b/TODO
index d0a723e1fd3195a37f074074050669600fc24042..bdb4783621a4c7a07f5b64b62c8f39ac5c539ed8 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.7 1999/11/21 00:17:12 tiniou Exp $
+$Id: TODO,v 1.8 1999/11/21 02:24:45 tiniou Exp $
 
 Need to verify:
 ---------------
 
 Need to verify:
 ---------------
@@ -31,3 +31,12 @@ All others:
 5.     Implement a DEBUG option which doesn't fork on each tape, making
        it able to debug dump with gdb.
 
 5.     Implement a DEBUG option which doesn't fork on each tape, making
        it able to debug dump with gdb.
 
+6.     Add a compression mode using zlib on each file (see
+       http://www.cdrom.com/pub/infozip/zlib).
+
+7.     Add some support in dump and restore for numbering in sequence
+       the output files (when dumping to a file). Something like -N <prefix>
+       which creates (or reads) <prefix>-1, <prefix>-2 etc...
+
+8.     Make a bootable dump tape? I don't know if it is possible...
+
index 41c975e7ccab1ac6a1668305c9a6701e9e4ed6df..0c8b42e9f88d2b07ab10659bb5a3d71851e89a84 100644 (file)
--- a/dump.lsm
+++ b/dump.lsm
@@ -1,13 +1,13 @@
 Begin3
 Title:          dump and restore for Ext2fs
 Begin3
 Title:          dump and restore for Ext2fs
-Version:        0.4b9
-Entered-date:   05NOV99
+Version:        0.4b10
+Entered-date:   21NOV99
 Description:    Port of the 4.4BSD dump and restore backup suite
 Keywords:       backup, filesystem, Ext2fs
 Author:         University of California, Berkeley
 Maintained-by:  pop@cybercable.fr (Stelian Pop)
 Primary-site:   tsx-11.mit.edu /pub/linux/ALPHA/ext2fs
 Description:    Port of the 4.4BSD dump and restore backup suite
 Keywords:       backup, filesystem, Ext2fs
 Author:         University of California, Berkeley
 Maintained-by:  pop@cybercable.fr (Stelian Pop)
 Primary-site:   tsx-11.mit.edu /pub/linux/ALPHA/ext2fs
-                135kB dump-0.4b9.tar.gz
+                135kB dump-0.4b10.tar.gz
                 677 dump.lsm
 Alternate-site: http://perso.cybercable.fr/pop/dump
 Original-site:  ftp.freebsd.org /pub/bsd-sources/4.4BSD-Lite2/sbin
                 677 dump.lsm
 Alternate-site: http://perso.cybercable.fr/pop/dump
 Original-site:  ftp.freebsd.org /pub/bsd-sources/4.4BSD-Lite2/sbin
index 60e117d1de1082ed0e804a5245ce4fd6fc4ec7f5..e5f6222140621bf6804e764fb9794a39fca14db8 100644 (file)
--- a/dump.spec
+++ b/dump.spec
@@ -1,6 +1,6 @@
 Summary: Programs for backing up and restoring filesystems.
 Name: dump
 Summary: Programs for backing up and restoring filesystems.
 Name: dump
-Version: 0.4b9
+Version: 0.4b10
 Release: 1
 Copyright: UCB
 Group: Applications/Archiving
 Release: 1
 Copyright: UCB
 Group: Applications/Archiving
@@ -117,6 +117,9 @@ rm -rf $RPM_BUILD_ROOT
 /sbin/rrestore.static
 
 %changelog
 /sbin/rrestore.static
 
 %changelog
+* Sun Nov 21 1999 Stelian Pop <pop@cybercable.fr>
+- dump 0.4b10 released, first packaging.
+
 * Thu Nov 11 1999 Stelian Pop <pop@cybercable.fr>
 - make static versions also for rescue purposes.
 
 * Thu Nov 11 1999 Stelian Pop <pop@cybercable.fr>
 - make static versions also for rescue purposes.
 
index 12228ec154637d70665a3e877aa8e8d9c4d37647..148e656660bdcdeda377485f75d476b10509c178 100644 (file)
@@ -4,7 +4,7 @@
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
  *     Stelian Pop <pop@cybercable.fr>, 1999
  *
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
  *     Stelian Pop <pop@cybercable.fr>, 1999
  *
- *     $Id: dump.h,v 1.6 1999/10/13 09:57:19 stelian Exp $
+ *     $Id: dump.h,v 1.7 1999/11/21 02:24:47 tiniou Exp $
  */
 
 /*-
  */
 
 /*-
@@ -229,6 +229,8 @@ extern int errno;
 
 #ifdef __linux__
 #define        DUMP_CURRENT_REV        1
 
 #ifdef __linux__
 #define        DUMP_CURRENT_REV        1
+
+int dump_fs_open(const char *disk, ext2_filsys *fs);
 #endif
 
 #ifndef        __linux__
 #endif
 
 #ifndef        __linux__
index 3348e18ab83637fe2c8ee7cec14028631e88a5c0..1ccbf367840438179d24dcca53c7ae5d86a22126 100644 (file)
@@ -40,7 +40,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.6 1999/10/13 09:57:19 stelian Exp $";
+       "$Id: main.c,v 1.7 1999/11/21 02:24:47 tiniou Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -414,7 +414,7 @@ main(int argc, char *argv[])
        msg("Label: %s\n", labelstr);
 
 #ifdef __linux__
        msg("Label: %s\n", labelstr);
 
 #ifdef __linux__
-       retval = ext2fs_open(disk, 0, 0, 0, unix_io_manager, &fs);
+       retval = dump_fs_open(disk, &fs);
        if (retval) {
                com_err(disk, retval, "while opening filesystem");
                if (retval == EXT2_ET_REV_TOO_HIGH)
        if (retval) {
                com_err(disk, retval, "while opening filesystem");
                if (retval == EXT2_ET_REV_TOO_HIGH)
index 1b28c41e6e6307a9a9f662d36fc243c0b28045c3..a0cc7e32b18629b83fb7c2d5dafec246cc4280ac 100644 (file)
@@ -40,7 +40,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.7 1999/11/02 09:35:56 tiniou Exp $";
+       "$Id: tape.c,v 1.8 1999/11/21 02:24:47 tiniou Exp $";
 #endif /* not lint */
 
 #ifdef __linux__
 #endif /* not lint */
 
 #ifdef __linux__
@@ -81,9 +81,10 @@ static const char rcsid[] =
 int    write(), read();
 #endif
 
 int    write(), read();
 #endif
 
-#ifdef __linux__
+#ifdef __linux__
 #include <ext2fs/ext2fs.h>
 #endif
 #include <ext2fs/ext2fs.h>
 #endif
+
 #include "dump.h"
 
 int    writesize;              /* size of malloc()ed buffer for tape */
 #include "dump.h"
 
 int    writesize;              /* size of malloc()ed buffer for tape */
@@ -908,9 +909,9 @@ doslave(int cmd, int slave_number)
                quit("slave couldn't reopen disk: %s\n", strerror(errno));
 #ifdef __linux__
        ext2fs_close(fs);
                quit("slave couldn't reopen disk: %s\n", strerror(errno));
 #ifdef __linux__
        ext2fs_close(fs);
-       retval = ext2fs_open(disk, 0, 0, 0, unix_io_manager, &fs);
+       retval = dump_fs_open(disk, &fs);
        if (retval)
        if (retval)
-               quit("slave couldn't reopen disk: %s\n", strerror(errno));
+               quit("slave couldn't reopen disk: %s\n", error_message(retval));
 #endif /* __linux__ */
 
        /*
 #endif /* __linux__ */
 
        /*
index 32ffd7ef4df4c8b9b54f9ab8f15247e092808b27..7d6a38f02f8dd7fa1db2cc35d56d0558f3401c9c 100644 (file)
@@ -40,7 +40,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: traverse.c,v 1.9 1999/11/21 00:17:16 tiniou Exp $";
+       "$Id: traverse.c,v 1.10 1999/11/21 02:24:47 tiniou Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -100,6 +100,35 @@ static     int searchdir __P((ino_t ino, daddr_t blkno, long size, long filesize));
 #endif
 static void mapfileino __P((ino_t ino, long *tapesize, int *dirskipped));
 
 #endif
 static void mapfileino __P((ino_t ino, long *tapesize, int *dirskipped));
 
+/* #define EXT3_FEATURE_INCOMPAT_RECOVER */
+
+int dump_fs_open(const char *disk, ext2_filsys *fs)
+{
+       int retval;
+       struct ext2fs_sb *s;
+
+#ifdef EXT3_FEATURE_INCOMPAT_RECOVER
+       retval = ext2fs_open(disk, EXT2_FLAG_FORCE, 0, 0, unix_io_manager, fs);
+#else
+       retval = ext2fs_open(disk, 0, 0, 0, unix_io_manager, fs);
+#endif
+       if (!retval) {
+               s = (struct ext2fs_sb *) (*fs)->super;
+               if ((s->s_feature_compat & ~EXT2_LIB_FEATURE_COMPAT_SUPP) ||
+#ifdef EXT3_FEATURE_INCOMPAT_RECOVER
+                   (s->s_feature_incompat & ~(EXT3_FEATURE_INCOMPAT_RECOVER | EXT2_LIB_FEATURE_INCOMPAT_SUPP))) {
+#else
+                   (s->s_feature_incompat & ~EXT2_LIB_FEATURE_INCOMPAT_SUPP)) {
+#endif
+                       retval = EXT2_ET_UNSUPP_FEATURE;
+               }
+               else if (s->s_feature_ro_compat & ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP) {
+                       retval = EXT2_ET_RO_UNSUPP_FEATURE;
+               }
+       }
+       return retval;
+}
+
 /*
  * This is an estimation of the number of TP_BSIZE blocks in the file.
  * It estimates the number of blocks in files with holes by assuming
 /*
  * This is an estimation of the number of TP_BSIZE blocks in the file.
  * It estimates the number of blocks in files with holes by assuming
index 7d55b2d60c3c1577d157e67147e93a8a82203f98..f52c36ba8b602b38c632457a4cd9b5fc9adee081 100644 (file)
--- a/rmt/rmt.c
+++ b/rmt/rmt.c
@@ -40,7 +40,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: rmt.c,v 1.7 1999/11/11 16:14:01 tiniou Exp $";
+       "$Id: rmt.c,v 1.8 1999/11/21 02:24:47 tiniou Exp $";
 #endif /* not linux */
 
 /*
 #endif /* not linux */
 
 /*
@@ -59,12 +59,6 @@ static const char rcsid[] =
 #include <string.h>
 #include <unistd.h>
 
 #include <string.h>
 #include <unistd.h>
 
-#ifdef __linux__
-#include <linux/ext2_fs.h>
-#include <ext2fs/ext2fs.h>
-#include <bsdcompat.h>
-#endif
-
 int    tape = -1;
 
 char   *record;
 int    tape = -1;
 
 char   *record;