X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs%2F.git;a=blobdiff_plain;f=yaffs_guts.h;h=03f8d0de9bca39b8f606288fe24fcae66052fa7e;hp=46e8f982fe704c63c388a4e344f36cf367711237;hb=9f5e5dc8f9b59a6949c8500f32efa9389d67fd38;hpb=657bdac1f20c85e9e0d06ef5fcdd49cec4d7627c diff --git a/yaffs_guts.h b/yaffs_guts.h index 46e8f98..03f8d0d 100644 --- a/yaffs_guts.h +++ b/yaffs_guts.h @@ -14,14 +14,13 @@ * * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. * - * $Id: yaffs_guts.h,v 1.15 2003-01-17 04:19:08 charles Exp $ + * $Id: yaffs_guts.h,v 1.19 2005-03-29 22:43:38 charles Exp $ */ #ifndef __YAFFS_GUTS_H__ #define __YAFFS_GUTS_H__ -#include "devextras.h" - +#include "yportenv.h" #define YAFFS_OK 1 #define YAFFS_FAIL 0 @@ -62,8 +61,6 @@ #define YAFFS_NOBJECT_BUCKETS 256 -#define YAFFS_RESERVED_BLOCKS 8 - #define YAFFS_OBJECT_SPACE 0x40000 #define YAFFS_MAX_NAME_LENGTH 255 #define YAFFS_SHORT_NAME_LENGTH 15 @@ -165,8 +162,8 @@ typedef struct #ifndef CONFIG_YAFFS_NO_YAFFS2 __u32 sequenceNumber; // block sequence number for yaffs2 #endif - int softDeletions:8; // number of soft deleted pages - int pagesInUse:8; // number of pages in use + int softDeletions:12; // number of soft deleted pages + int pagesInUse:12; // number of pages in use __u32 blockState:4; // One of the above block states __u32 needsRetiring:1; // Data has failed on this block, need to get valid data off // and retire the block. @@ -363,6 +360,8 @@ struct yaffs_ObjectStruct #ifdef __KERNEL__ struct inode *myInode; + __u8 deferedFree; // YAFFS has removed the object from NAND, but it is being kept + // Alive until the inode is cleared to prevent inode inconsistencies. #endif @@ -399,9 +398,11 @@ struct yaffs_DeviceStruct { // Entry parameters set up way early. Yaffs sets up the rest. int nBytesPerChunk; // Should be a power of 2 >= 512 - int nChunksPerBlock; - int startBlock; // Start block we're allowed to use - int endBlock; // End block we're allowed to use + int nChunksPerBlock; // does not need to be a power of 2 + int startBlock; // Start block we're allowed to use + int endBlock; // End block we're allowed to use + int nReservedBlocks; // We want this tuneable so that we can reduce + // reserved blocks on NOR and RAM. int useNANDECC; // Flag to decide whether or not to use NANDECC int nShortOpCaches; // If <= 0, then short op caching is disabled, else @@ -576,6 +577,9 @@ yaffs_Object *yaffs_LostNFound(yaffs_Device *dev); void yfsd_WinFileTimeNow(__u32 target[2]); #endif +#ifdef __KERNEL__ +void yaffs_HandleDeferedFree(yaffs_Object *obj); +#endif // Debug dump int yaffs_DumpObject(yaffs_Object *obj); @@ -586,3 +590,4 @@ void yaffs_GutsTest(yaffs_Device *dev); #endif +