All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: fsck.reiser4 assertion failure
  2003-12-25 16:39 fsck.reiser4 assertion failure Dorin Popa
@ 2003-12-25 11:24 ` Vitaly Fertman
  0 siblings, 0 replies; 2+ messages in thread
From: Vitaly Fertman @ 2003-12-25 11:24 UTC (permalink / raw)
  To: Dorin Popa, reiserfs-list

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

Hello, Dorin, 

On Thursday 25 December 2003 19:39, Dorin Popa wrote:
> Hi,
>
> I use reiser4progs 0.4.20 with repair_fs_open.patch (I had the same
> problem as David Masover, but the patch fixed it). It seems that
> fsck.reiser4 encounters some internal error condition. Please see the
> fsck.reiser4 output in the attached file.

yes, I have fixed this bug yesterday. The patch attached includes 
the previous patch with all other important fixes for fsck.reiser4 
against 0.4.20.

Thank you for the report anyway,
Vitaly Fertman







[-- Attachment #2: reiser4progs-0.4.20-fixes-25.12.03.patch --]
[-- Type: text/x-diff, Size: 4506 bytes --]

diff -Nru a/librepair/filesystem.c b/librepair/filesystem.c
--- a/librepair/filesystem.c	Thu Dec 25 13:54:48 2003
+++ b/librepair/filesystem.c	Thu Dec 25 13:54:48 2003
@@ -48,11 +48,36 @@
 		goto error_format_close;
 	}
 	
+	len = reiser4_format_get_len(repair->fs->format);
+
+	/* Block and oid allocator plugins are specified by format plugin 
+	 * unambiguously, so there is nothing to be checked here anymore. */
+	if (!(repair->fs->alloc = reiser4_alloc_open(repair->fs, len))) {
+		aal_fatal("Failed to open a block allocator.");
+		res = -EINVAL;
+		goto error_status_close;
+	}
+	
+	if ((error = reiser4_alloc_valid(repair->fs->alloc)) < 0)
+		goto error_alloc_close;
+	
+	if (error && repair->mode != RM_CHECK) {
+		aal_mess("Checksums will be fixed later.\n");
+	} else {
+		res |= error;
+	}
+	
+	if (!(repair->fs->oid = reiser4_oid_open(repair->fs))) {	
+		aal_fatal("Failed to open an object id allocator.");
+		res = -EINVAL;
+		goto error_alloc_close;
+	}
+
 	res |= repair_journal_open(repair->fs, journal_device, repair->mode);
 	
 	if (repair_error_fatal(res)) {
 		aal_fatal("Failed to open the journal.");
-		goto error_status_close;
+		goto error_oid_close;
 	}
 	
 	res |= repair_journal_replay(repair->fs->journal, repair->fs->device);
@@ -69,48 +94,25 @@
 			  "replaying.");
 		goto error_journal_close;
 	}
-
-	len = reiser4_format_get_len(repair->fs->format);
-
-	/* Block and oid allocator plugins are specified by format plugin 
-	 * unambiguously, so there is nothing to be checked here anymore. */
-	if (!(repair->fs->alloc = reiser4_alloc_open(repair->fs, len))) {
-		aal_fatal("Failed to open a block allocator.");
-		res = -EINVAL;
-		goto error_journal_close;
-	}
 	
-	if ((res |= error = reiser4_alloc_valid(repair->fs->alloc)) < 0)
-		goto error_alloc_close;
-	
-	if (error && repair->mode != RM_CHECK)
-		aal_mess("Checksums will be fixed later.\n");
-		
-	if (!(repair->fs->oid = reiser4_oid_open(repair->fs))) {	
-		aal_fatal("Failed to open an object id allocator.");
-		res = -EINVAL;
-		goto error_alloc_close;
-	}
-
 	if (!(repair->fs->tree = reiser4_tree_init(repair->fs))) {
 		res = -ENOMEM;
-		goto error_oid_close;
+		goto error_journal_close;
 	}
 		
-	
 	repair_error_count(repair, res);
 	return 0;
 
+error_journal_close:
+	reiser4_journal_close(repair->fs->journal);
+	repair->fs->journal = NULL;
+
  error_oid_close:
 	reiser4_tree_fini(repair->fs->tree);
 	
  error_alloc_close:
 	reiser4_alloc_close(repair->fs->alloc);
 	repair->fs->alloc = NULL;
-    
- error_journal_close:
-	reiser4_journal_close(repair->fs->journal);
-	repair->fs->journal = NULL;
 
  error_status_close:
 	reiser4_status_close(repair->fs->status);
diff -Nru a/librepair/item.c b/librepair/item.c
--- a/librepair/item.c	Thu Dec 25 13:54:48 2003
+++ b/librepair/item.c	Thu Dec 25 13:54:48 2003
@@ -81,7 +81,6 @@
 	
 	aal_assert("vpf-795", mode != RM_CHECK || 
 			      length == place->len);
-	aal_assert("vpf-796", length == place->len || res);
 	
 	return repair_item_check_fini(place, res, length);
 }
diff -Nru a/plugin/item/extent40/extent40_repair.c b/plugin/item/extent40/extent40_repair.c
--- a/plugin/item/extent40/extent40_repair.c	Thu Dec 25 13:54:48 2003
+++ b/plugin/item/extent40/extent40_repair.c	Thu Dec 25 13:54:48 2003
@@ -21,7 +21,7 @@
 	ET40_TAIL	= 1 << 4
 } merge_flag_t;
 
-static int extent40_merge_units(reiser4_place_t *place) {
+static int extent40_merge_units(reiser4_place_t *place, int fix) {
 	uint32_t i, count, merged;
 	extent40_t *extent;
 
@@ -38,11 +38,14 @@
 			et40_set_width(extent - 1, et40_get_width(extent - 1)
 				       + et40_get_width(extent));
 
-			extent40_shrink(place, i, 1);
-			count--;
 			merged++;
-			extent--;
-			i--;
+			
+			if (fix) {
+				extent40_shrink(place, i, 1);
+				count--;
+				extent--;
+				i--;
+			}
 		}
 	}
 
@@ -93,7 +96,7 @@
 			result = RE_FIXABLE;
 	}
 	
-	units = extent40_merge_units(place);
+	units = extent40_merge_units(place, mode != RM_CHECK);
 	
 	if (units) {
 		aal_error("Node (%llu), item (%u): %u mergable units were "
@@ -168,7 +171,7 @@
 			res |= RE_FIXABLE;
 	}
 	
-	units = extent40_merge_units(place);
+	units = extent40_merge_units(place, mode != RM_CHECK);
 
 	if (units) {
 		aal_error("Node (%llu), item (%u): %u mergable units were "
@@ -441,7 +444,7 @@
 	}
 	
 	/* Join mergable units within the @place. */
-	hint->len = extent40_merge_units(place) * sizeof(extent40_t);
+	hint->len = extent40_merge_units(place, 1) * sizeof(extent40_t);
 	
 	place_mkdirty(place);
 	

^ permalink raw reply	[flat|nested] 2+ messages in thread

* fsck.reiser4 assertion failure
@ 2003-12-25 16:39 Dorin Popa
  2003-12-25 11:24 ` Vitaly Fertman
  0 siblings, 1 reply; 2+ messages in thread
From: Dorin Popa @ 2003-12-25 16:39 UTC (permalink / raw)
  To: reiserfs-list

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Hi,

I use reiser4progs 0.4.20 with repair_fs_open.patch (I had the same 
problem as David Masover, but the patch fixed it). It seems that 
fsck.reiser4 encounters some internal error condition. Please see the 
fsck.reiser4 output in the attached file.

-- 
Thanks,
Dorin Popa


[-- Attachment #2: fsck.txt --]
[-- Type: text/plain, Size: 1342 bytes --]

Fscking the /dev/hda8 block device.
Will check the consistency of the Reiser4 SuperBlock.
Will build the Reiser4 FileSystem.
Continue? 
(Yes/No): ***** Openning the fs.
Reiser4 fs was detected on the /dev/hda8.
Master super block (16):
magic:		R4Sb
blksize:	4096
format:		0x0 (format40)
label:		usr

Format super block (17):
plugin:		format40
description:	Disk-format for reiser4, ver. 0.4.20
magic:		R4Sb-Default
flushes:	0
mkfs id:	0x1f15877c
blocks:		985981
free blocks:	255430
root block:	30
tail policy:	0x4 (smart)
next oid:	0xebc9f
file count:	126144
tree height:	4
key policy:	LARGE



***** Tree Traverse Pass: scanning the reiser4 internal tree.


	Read nodes 94104
	Nodes left in the tree 94104
		Leaves of them 92356, Twigs of them 1717
	Time interval: Thu Dec 25 18:16:44 2003 - Thu Dec 25 18:18:05 2003
***** TwigScan Pass: checking extent pointers of all twigs.


	Read twigs 1717
	Time interval: Thu Dec 25 18:18:05 2003 - Thu Dec 25 18:18:08 2003
***** DiskScan Pass: scanning the partition for unconnected nodes.


	Read nodes 21732
	Good nodes 45
		Leaves of them 37, Twigs of them 8
	Time interval: Thu Dec 25 18:18:09 2003 - Thu Dec 25 18:18:11 2003
***** TwigScan Pass: checking extent pointers of all twigs.
vpf-796: Assertion (length == place->len || res) at item.c:84 in function 
repair_item_check_layout() failed. 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-25 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-25 16:39 fsck.reiser4 assertion failure Dorin Popa
2003-12-25 11:24 ` Vitaly Fertman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.