From 35e9cbab471f74b1deeecda7f99b2f2270bc9664 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 14 May 2007 02:09:03 -0500 Subject: [PATCH] tweak reserved blocks --- fs/jffs2/nodelist.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h index 795e1b4..905585b 100644 --- a/fs/jffs2/nodelist.h +++ b/fs/jffs2/nodelist.h @@ -218,6 +218,8 @@ struct jffs2_eraseblock } \ } 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 */ @@ -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 */ +#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) -- 2.20.1