[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Inconsistent ext3fs after crash (2.2.19/0.0.7a)



On Tue, Jun 19, 2001 at 08:17:49PM +0100, Stephen C. Tweedie wrote:
> Hi,
> 
> On Sun, Jun 17, 2001 at 11:45:23PM +0200, Alain Schroeder wrote:
> 
> > I had the same experience as Flo on a 2.4.5 with ext3-0.0.6. But I had
> > with my /tmp partition. When I have load on my - well - Laptop it is
> > quite reproducable...
> 
> Andrew has traced it to e2fsck's handling of orphaned special device
> inodes.  The fix should be simple.

... and embarassing.  And of course, it gets discovered right after I
release e2fsprogs 1.21 final.  :-) 

Ah, well, time for another relase soon.  Here's the patch.

						- Ted

# This is a BitKeeper generated patch for the following project:
# Project Name: Ext2 filesystem utilities
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.662   -> 1.662.1.1
#	      e2fsck/super.c	1.28    -> 1.29   
#	    e2fsck/ChangeLog	1.195   -> 1.196  
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 01/06/20	tytso think thunk org	1.662.1.1
# super.c (release_inode_blocks): Don't try to release the blocks
# 	if the orphaned inode is a device file, symlink, or some
# 	other kind of special file that doesn't have a block list.
# --------------------------------------------
#
diff -Nru a/e2fsck/ChangeLog b/e2fsck/ChangeLog
--- a/e2fsck/ChangeLog	Wed Jun 20 00:58:29 2001
+++ b/e2fsck/ChangeLog	Wed Jun 20 00:58:29 2001
@@ -1,3 +1,9 @@
+2001-06-19  Theodore Tso  <tytso valinux com>
+
+	* super.c (release_inode_blocks): Don't try to release the blocks
+		if the orphaned inode is a device file, symlink, or some
+		other kind of special file that doesn't have a block list.
+
 2001-06-15  Theodore Tso  <tytso valinux com>
 
 	* Release of E2fsprogs 1.21
diff -Nru a/e2fsck/super.c b/e2fsck/super.c
--- a/e2fsck/super.c	Wed Jun 20 00:58:29 2001
+++ b/e2fsck/super.c	Wed Jun 20 00:58:29 2001
@@ -172,6 +172,9 @@
 	errcode_t			retval;
 	struct process_block_struct 	pb;
 
+	if (!ext2fs_inode_has_valid_blocks(inode))
+		return 0;
+
 	pb.buf = block_buf + 3 * ctx->fs->blocksize;
 	pb.ctx = ctx;
 	pb.abort = 0;










[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]