Skip to contentSkip to conversation

Bug in error handling

Ocfs2-devel John L. Villalovos 2 participants 2 messages Mar 9, 2004 OCFS2

lore
Share & tools
lore
#0 lore raw

I have encountered on my system a bug when OCFS2 tries to do a journal_wipe.

At the time that it does the call it gets back an error of -22.

The problem is that it seems to leave stuff in an inconsistent state when it exits out of the functions that have called it. So later on bad things happen :(

This diff simulates the error that I received. I am trying to figure out what is the stuff that has been partially initialized when this gets called but I am having a bit of difficulty and tracking it all down :(

John

journal.c +4 -1
Index: journal.c
===================================================================
@@ -1261,8 +1261,11 @@
  	if (!journal)
  		BUG();
 
-	status = journal_wipe(journal->k_journal, full);
+// FIXME: Simulate BUG
+//	status = journal_wipe(journal->k_journal, full);
+	status = -22;
 
+
  	LOG_EXIT_STATUS(status);
  	return(status);
  }
#1 lore raw

At what point did you first see the error? Was it a 1st mount of a fresh file system or just a normal mount? I assume the file system failed to mount because of this error... Can you be more specific as to what Bad Things (TM) were happening? :) Did it crash or what?

	--Mark
Quoted 32 lines · John L. Villalovos

I have encountered on my system a bug when OCFS2 tries to do a journal_wipe.

At the time that it does the call it gets back an error of -22.

The problem is that it seems to leave stuff in an inconsistent state when it exits out of the functions that have called it. So later on bad things happen :(

This diff simulates the error that I received. I am trying to figure out what is the stuff that has been partially initialized when this gets called but I am having a bit of difficulty and tracking it all down :(

John

Index: journal.c
===================================================================

journal.c +4 -1
@@ -1261,8 +1261,11 @@
 	if (!journal)
 		BUG();
 
-	status = journal_wipe(journal->k_journal, full);
+// FIXME: Simulate BUG
+//	status = journal_wipe(journal->k_journal, full);
+	status = -22;
 
+
 	LOG_EXIT_STATUS(status);
 	return(status);
 }
Quoted 4 lines

_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel

--
Mark Fasheh
Software Developer, Oracle Corp
[email protected]