*
* Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
*
- * $Id: yaffs_guts.h,v 1.21 2006-05-08 10:13:34 charles Exp $
+ * $Id: yaffs_guts.h,v 1.22 2006-05-17 09:31:06 charles Exp $
*/
#ifndef __YAFFS_GUTS_H__
/* Sseudo object ids for checkpointing */
#define YAFFS_OBJECTID_SB_HEADER 0x10
#define YAFFS_OBJECTID_CHECKPOINT_DATA 0x20
+#define YAFFS_SEQUENCE_CHECKPOINT_DATA 0x21
/* */
YAFFS_BLOCK_STATE_ALLOCATING,
/* This block is partially allocated.
+ * At least one page holds valid data.
* This is the one currently being used for page
* allocation. Should never be more than one of these
*/
YAFFS_BLOCK_STATE_FULL,
/* All the pages in this block have been allocated.
- * At least one page holds valid data.
*/
YAFFS_BLOCK_STATE_DIRTY,
* Erase me, reuse me.
*/
+ YAFFS_BLOCK_STATE_CHECKPOINT,
+ /* This block is assigned to holding checkpoint data.
+ */
+
YAFFS_BLOCK_STATE_COLLECTING,
/* This block is being garbage collected */
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. */
- /* Stuff used by checkpointing */
- int headerBlock;
+
+ /* Stuff used by the partitioned checkpointing mechanism */
int checkpointStartBlock;
int checkpointEndBlock;
+
+ /* Stuff used by the shared space checkpointing mechanism */
+ /* If this value is zero, then this mechanism is disabled */
+
+ int nCheckpointReservedBlocks; /* Blocks to reserve for checkpoint data */
void *genericDevice; /* Pointer to device context
* On an mtd this holds the mtd pointer.
*/
+ void *superBlock;
+
/* NAND access functions (Must be set before calling YAFFS)*/
int (*writeChunkToNAND) (struct yaffs_DeviceStruct * dev,
*/
void (*removeObjectCallback)(struct yaffs_ObjectStruct *obj);
+ /* Callback to mark the superblock dirsty */
+ void (*markSuperBlockDirty)(void * superblock);
+
int wideTnodesDisabled; /* Set to disable wide tnodes */
/* Runtime checkpointing stuff */
- int checkpointBlock;
- int checkpointPage;
+ int checkpointPageSequence; /* running sequence number of checkpoint pages */
int checkpointByteCount;
int checkpointByteOffset;
__u8 *checkpointBuffer;
int checkpointOpenForWrite;
+ int blocksInCheckpoint;
+ int checkpointCurrentChunk;
+ int checkpointCurrentBlock;
+ int checkpointNextBlock;
+ int *checkpointBlockList;
+ int checkpointMaxBlocks;
/* Block Info */
yaffs_BlockInfo *blockInfo;