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

[PATCH]: The file 'os/elinux/fs/jffs/jffs_fm.c' has been modified.(fwd)



The following file was modified in os/elinux/fs/jffs:

Name            Old version     New version     Comment
----            -----------     -----------     -------
jffs_fm.c       1.43            1.44            

The accompanying log:

Bug that caused infinite garbage collection fixed (fmc->dirty_size was
incorrect) 

The diff of the modified file(s):

--- jffs_fm.c	2000/05/15 15:49:15	1.43
+++ jffs_fm.c	2000/06/30 12:20:15	1.44
@@ -265,7 +265,11 @@
 		fm->offset = fmc->tail->offset + fmc->tail->size;
 		fm->size = free_chunk_size1;
 		fm->nodes = 0;
-		fmc->dirty_size += size;
+		fmc->dirty_size += fm->size; /* Changed by simonk. This seemingly fixes a 
+						bug that caused infinite garbage collection.
+						It previously set fmc->dirty_size to size (which is the
+						size of the requested chunk).
+					     */
 	}
 
 	fm->next = 0;
@@ -687,6 +691,7 @@
 	if (ret == 0) {
 		struct jffs_fm *head = fmc->head;
 		struct jffs_fm *del;
+		/* While there are two dirty nodes beside each other.*/
 		while (head->nodes == 0
 		       && head->next
 		       && head->next->nodes == 0) {