*
* Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
*
- * $Id: yaffs_guts.h,v 1.16 2003-01-31 03:30:33 charles Exp $
+ * $Id: yaffs_guts.h,v 1.20 2005-06-25 03:22:24 charles Exp $
*/
#ifndef __YAFFS_GUTS_H__
#define __YAFFS_GUTS_H__
-#include "devextras.h"
-
+#include "yportenv.h"
#define YAFFS_OK 1
#define YAFFS_FAIL 0
#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.
#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
{
// Entry parameters set up way early. Yaffs sets up the rest.
int nBytesPerChunk; // Should be a power of 2 >= 512
- int nChunksPerBlock; // does not need to be a power of 2
+ 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
int (*initialiseNAND)(struct yaffs_DeviceStruct *dev);
// Runtime parameters. Set up by YAFFS.
+ int internalStartBlock; // Internal version of startBlock
+ int internalEndBlock; // End block we're allowed to use
+ int blockOffset;
+ int chunkOffset;
+
__u16 chunkGroupBits; // 0 for devices <= 32MB. else log2(nchunks) - 16
__u16 chunkGroupSize; // == 2^^chunkGroupBits
void yfsd_WinFileTimeNow(__u32 target[2]);
#endif
+#ifdef __KERNEL__
+void yaffs_HandleDeferedFree(yaffs_Object *obj);
+#endif
// Debug dump
int yaffs_DumpObject(yaffs_Object *obj);
#endif
+