tweak reserved blocks
authorDobrica Pavlinusic <dpavlin@brr.lan>
Mon, 14 May 2007 07:09:03 +0000 (02:09 -0500)
committerDobrica Pavlinusic <dpavlin@brr.lan>
Mon, 14 May 2007 07:09:03 +0000 (02:09 -0500)
fs/jffs2/nodelist.h

index 795e1b4..905585b 100644 (file)
@@ -218,6 +218,8 @@ struct jffs2_eraseblock
                } \
        } while(0)
 
                } \
        } while(0)
 
+//REX:
+#if 0
 #define ALLOC_NORMAL   0       /* Normal allocation */
 #define ALLOC_DELETION 1       /* Deletion node. Best to allow it */
 #define ALLOC_GC       2       /* Space requested for GC. Give it or die */
 #define ALLOC_NORMAL   0       /* Normal allocation */
 #define ALLOC_DELETION 1       /* Deletion node. Best to allow it */
 #define ALLOC_GC       2       /* Space requested for GC. Give it or die */
@@ -228,6 +230,19 @@ struct jffs2_eraseblock
 #define JFFS2_RESERVED_BLOCKS_GCTRIGGER (JFFS2_RESERVED_BLOCKS_BASE + 3)       /* ... wake up the GC thread */
 #define JFFS2_RESERVED_BLOCKS_GCBAD (JFFS2_RESERVED_BLOCKS_BASE + 1)           /* ... pick a block from the bad_list to GC */
 #define JFFS2_RESERVED_BLOCKS_GCMERGE (JFFS2_RESERVED_BLOCKS_BASE)             /* ... merge pages when garbage collecting */
 #define JFFS2_RESERVED_BLOCKS_GCTRIGGER (JFFS2_RESERVED_BLOCKS_BASE + 3)       /* ... wake up the GC thread */
 #define JFFS2_RESERVED_BLOCKS_GCBAD (JFFS2_RESERVED_BLOCKS_BASE + 1)           /* ... pick a block from the bad_list to GC */
 #define JFFS2_RESERVED_BLOCKS_GCMERGE (JFFS2_RESERVED_BLOCKS_BASE)             /* ... merge pages when garbage collecting */
+#endif
+
+#define ALLOC_NORMAL   0       /* Normal allocation */
+#define ALLOC_DELETION 1       /* Deletion node. Best to allow it */
+#define ALLOC_GC       2       /* Space requested for GC. Give it or die */
+
+#define JFFS2_RESERVED_BLOCKS_BASE 0                                           /* Number of free blocks there must be before we... */
+#define JFFS2_RESERVED_BLOCKS_WRITE (JFFS2_RESERVED_BLOCKS_BASE + 1)           /* ... allow a normal filesystem write */
+#define JFFS2_RESERVED_BLOCKS_DELETION (JFFS2_RESERVED_BLOCKS_BASE + 1)                /* ... allow a normal filesystem deletion */
+#define JFFS2_RESERVED_BLOCKS_GCTRIGGER (JFFS2_RESERVED_BLOCKS_BASE + 2)       /* ... wake up the GC thread */
+#define JFFS2_RESERVED_BLOCKS_GCBAD (JFFS2_RESERVED_BLOCKS_BASE + 1)           /* ... pick a block from the bad_list to GC */
+#define JFFS2_RESERVED_BLOCKS_GCMERGE (JFFS2_RESERVED_BLOCKS_BASE)             /* ... merge pages when garbage collecting */
+
 
 
 #define PAD(x) (((x)+3)&~3)
 
 
 #define PAD(x) (((x)+3)&~3)