X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.h;h=87b539b05b71284a20efcb9350ba5e653a8aecce;hp=a88b36ec5da27bbb079d6dcc4854dc17be327d2e;hb=e39518410bfa410b09e4b270755f756b91456001;hpb=b0b91352fff81d01d34fd562629ce199c255cdd6 diff --git a/yaffs_guts.h b/yaffs_guts.h index a88b36e..87b539b 100644 --- a/yaffs_guts.h +++ b/yaffs_guts.h @@ -92,6 +92,12 @@ #define YAFFS_N_TEMP_BUFFERS 4 +/* We limit the number attempts at sucessfully saving a chunk of data. + * Small-page devices have 32 pages per block; large-page devices have 64. + * Default to something in the order of 5 to 10 blocks worth of chunks. + */ +#define YAFFS_WR_ATTEMPTS (5*64) + /* Sequence numbers are used in YAFFS2 to determine block allocation order. * The range is limited slightly to help distinguish bad numbers from good. * This also allows us to perhaps in the future use special numbers for @@ -271,7 +277,7 @@ typedef struct { int softDeletions:10; /* number of soft deleted pages */ int pagesInUse:10; /* number of pages in use */ - yaffs_BlockState blockState:4; /* One of the above block states */ + unsigned blockState:4; /* One of the above block states. NB use unsigned because enum is sometimes an int */ __u32 needsRetiring:1; /* Data has failed on this block, need to get valid data off */ /* and retire the block. */ __u32 skipErasedCheck: 1; /* If this is set we can skip the erased check on this block */ @@ -692,6 +698,7 @@ struct yaffs_DeviceStruct { int currentDirtyChecker; /* Used to find current dirtiest block */ __u32 *gcCleanupList; /* objects to delete at the end of a GC. */ + int nonAggressiveSkip; /* GC state/mode */ /* Statistcs */ int nPageWrites;