From f346e363095baec1d3b8e8b8a0ed31792d42a861 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Sun, 9 Jan 2000 23:47:29 +0000 Subject: [PATCH] 'filetype' feature bug when dumping huge filesystems. --- CHANGES | 7 ++++++- THANKS | 3 ++- dump/traverse.c | 10 +++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index d4ab15f..7739610 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.32 2000/01/09 23:40:10 tiniou Exp $ +$Id: CHANGES,v 1.33 2000/01/09 23:47:29 tiniou Exp $ Changes between versions 0.4b12 and 0.4b13 (released ???????????????) ===================================================================== @@ -10,6 +10,11 @@ Changes between versions 0.4b12 and 0.4b13 (released ???????????????) spec file. Thanks to Christian Weisgerber for submitting this. +3. Fix a bug in dump related to the 'filetype' feature of ext2fs, + causing dump to block when dumping really huge filesystems. + Many thanks to Patrik Schindler for + helping me find this bug. + Changes between versions 0.4b11 and 0.4b12 (released January 8, 2000) ===================================================================== diff --git a/THANKS b/THANKS index 58bd08e..1f71a09 100644 --- a/THANKS +++ b/THANKS @@ -1,4 +1,4 @@ -$Id: THANKS,v 1.16 2000/01/08 10:00:39 tiniou Exp $ +$Id: THANKS,v 1.17 2000/01/09 23:47:29 tiniou Exp $ Dump and restore were written by the people of the CSRG at the University of California, Berkeley. @@ -53,3 +53,4 @@ Theodore Y. Ts'o tytso@mit.edu Stephen Tweedie sct@dcs.ed.ac.uk Daniel Veillard Daniel.Veillard@imag.fr Jason Venner jason@idiom.com +Christian Weisgerber naddy@mips.rhein-neckar.de diff --git a/dump/traverse.c b/dump/traverse.c index a95a21e..9c275c1 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.11 1999/12/05 18:21:23 tiniou Exp $"; + "$Id: traverse.c,v 1.12 2000/01/09 23:47:33 tiniou Exp $"; #endif /* not lint */ #include @@ -283,9 +283,9 @@ mapfilesindir(struct ext2_dir_entry *dirent, int offset, int blocksize, char *bu dp = getino(dirent->inode); mode = dp->di_mode & IFMT; if (mode == IFDIR && dp->di_nlink != 0 && dp->di_dtime == 0) { - if ((dirent->name[0] != '.' || dirent->name_len != 1) && + if ((dirent->name[0] != '.' || ( dirent->name_len & 0xFF ) != 1) && (dirent->name[0] != '.' || dirent->name[1] != '.' || - dirent->name_len != 2)) { + ( dirent->name_len & 0xFF ) != 2)) { retval = ext2fs_dir_iterate(fs, ino, 0, NULL, mapfilesindir, private); if (retval) @@ -516,9 +516,9 @@ searchdir(struct ext2_dir_entry *dp, int offset, int blocksize, char *buf, void if (dp->inode == 0) return 0; if (dp->name[0] == '.') { - if (dp->name_len == 1) + if (( dp->name_len & 0xFF ) == 1) return 0; - if (dp->name[1] == '.' && dp->name_len == 2) + if (dp->name[1] == '.' && ( dp->name_len & 0xFF ) == 2) return 0; } if (mdc->nodump) { -- 2.39.2