From 7fdfabd3217ebe23b36063d561fc79960275db42 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 24 Nov 1997 11:51:17 +0000 Subject: [PATCH] ChangeLog, pass1.c, util.c: pass1.c (e2fsck_pass1_check_device_inode): For now, only check to make sure the extra i_blocks in a device are cleared if the immutable flag is set. util.c (print_resource_track): Fix typo which caused the time/resource tracking to print "Pass 1 :" instead of "Pass 1: ". version.h: Change version to 1.12-WIP, in preparation for an e2fsprogs 1.12 release. --- e2fsck/ChangeLog | 10 ++++++++++ e2fsck/pass1.c | 19 ++++++++++++++++--- e2fsck/util.c | 2 +- version.h | 4 ++-- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 5370bfb..17a76b7 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,13 @@ +Mon Nov 24 06:48:00 1997 Theodore Ts'o + + * pass1.c (e2fsck_pass1_check_device_inode): For now, only check + to make sure the extra i_blocks in a device are cleared if + the immutable flag is set. + + * util.c (print_resource_track): Fix typo which caused the + time/resource tracking to print "Pass 1 :" instead of + "Pass 1: ". + Thu Nov 20 16:02:23 1997 Theodore Ts'o * pass3.c (expand_directory): Fix bug which could cause core dump diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index f2e0e6c..9ccde39 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -113,9 +113,22 @@ int e2fsck_pass1_check_device_inode(struct ext2_inode *inode) { int i; - for (i=4; i < EXT2_N_BLOCKS; i++) - if (inode->i_block[i]) - return 0; + /* + * We should be able to do the test below all the time, but + * because the kernel doesn't forcibly clear the device + * inode's additional i_block fields, there are some rare + * occasions when a legitimate device inode will have non-zero + * additional i_block fields. So for now, we only complain + * when the immutable flag is set, which should never happen + * for devices. (And that's when the problem is caused, since + * you can't set or clear immutable flags for devices.) Once + * the kernel has been fixed we can change this... + */ + if (inode->i_flags & EXT2_IMMUTABLE_FL) { + for (i=4; i < EXT2_N_BLOCKS; i++) + if (inode->i_block[i]) + return 0; + } return 1; } diff --git a/e2fsck/util.c b/e2fsck/util.c index 37509c8..6634cec 100644 --- a/e2fsck/util.c +++ b/e2fsck/util.c @@ -224,7 +224,7 @@ void print_resource_track(const char *desc, struct resource_track *track) gettimeofday(&time_end, 0); if (desc) - printf("%s :", desc); + printf("%s: ", desc); #ifdef HAVE_GETRUSAGE getrusage(RUSAGE_SELF, &r); diff --git a/version.h b/version.h index ee18283..417e9c9 100644 --- a/version.h +++ b/version.h @@ -6,6 +6,6 @@ * redistributed under the GNU Public License. */ -#define E2FSPROGS_VERSION "1.11-WIP" -#define E2FSPROGS_DATE "25-Oct-97" +#define E2FSPROGS_VERSION "1.12-WIP" +#define E2FSPROGS_DATE "23-Nov-97" -- 1.8.3.1