X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.h;h=3c7358316aba87ffa7140402f8cbba8c4baa5848;hp=450672496f0f326971d785065f17c437a4902539;hb=fc8acddcc3540df0d9c03c3a955d5ccd5877635d;hpb=40c386c7a14ebfa8afc14562f3b33a416831b26d diff --git a/yaffs_guts.h b/yaffs_guts.h index 4506724..3c73583 100644 --- a/yaffs_guts.h +++ b/yaffs_guts.h @@ -132,12 +132,12 @@ typedef struct { #ifndef CONFIG_YAFFS_NO_YAFFS1 typedef struct { - unsigned chunkId:20; - unsigned serialNumber:2; - unsigned byteCount:10; - unsigned objectId:18; - unsigned ecc:12; - unsigned unusedStuff:2; + unsigned chunkId:20; + unsigned serialNumber:2; + unsigned byteCountLSB:10; + unsigned objectId:18; + unsigned ecc:12; + unsigned byteCountMSB:2; } yaffs_Tags; @@ -420,10 +420,12 @@ struct yaffs_ObjectStruct { __u8 deferedFree:1; /* For Linux kernel. Object is removed from NAND, but is * still in the inode cache. Free of object is defered. * until the inode is released. - */ + */ - __u8 serial; /* serial number of chunk in NAND. Cached here */ - __u16 sum; /* sum of the name to speed searching */ + __u8 serial; /* serial number of chunk in NAND. Cached here */ +/* __u16 sum_prev; */ + __u16 sum; /* sum of the name to speed searching */ +/* __u16 sum_trailer; */ struct yaffs_DeviceStruct *myDev; /* The device I'm on */ @@ -436,17 +438,17 @@ struct yaffs_ObjectStruct { struct yaffs_ObjectStruct *parent; struct ylist_head siblings; - /* Where's my object header in NAND? */ - int chunkId; + /* Where's my object header in NAND? */ + int hdrChunk; int nDataChunks; /* Number of data chunks attached to the file. */ __u32 objectId; /* the object id value */ - __u32 yst_mode; + __u32 yst_mode; #ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM - YCHAR shortName[YAFFS_SHORT_NAME_LENGTH + 1]; + YCHAR shortName[YAFFS_SHORT_NAME_LENGTH + 1]; #endif #ifndef __KERNEL__ @@ -501,8 +503,7 @@ typedef struct { int structType; __u32 objectId; __u32 parentId; - int chunkId; - + int hdrChunk; yaffs_ObjectType variantType:3; __u8 deleted:1; __u8 softDeleted:1; @@ -573,12 +574,13 @@ struct yaffs_DeviceStruct { int (*readChunkFromNAND) (struct yaffs_DeviceStruct * dev, int chunkInNAND, __u8 * data, yaffs_Spare * spare); - int (*eraseBlockInNAND) (struct yaffs_DeviceStruct * dev, - int blockInNAND); - int (*initialiseNAND) (struct yaffs_DeviceStruct * dev); + int (*eraseBlockInNAND) (struct yaffs_DeviceStruct * dev, + int blockInNAND); + int (*initialiseNAND) (struct yaffs_DeviceStruct * dev); + int (*deinitialiseNAND) (struct yaffs_DeviceStruct * dev); #ifdef CONFIG_YAFFS_YAFFS2 - int (*writeChunkWithTagsToNAND) (struct yaffs_DeviceStruct * dev, + int (*writeChunkWithTagsToNAND) (struct yaffs_DeviceStruct * dev, int chunkInNAND, const __u8 * data, const yaffs_ExtendedTags * tags); int (*readChunkWithTagsFromNAND) (struct yaffs_DeviceStruct * dev, @@ -693,6 +695,8 @@ struct yaffs_DeviceStruct { int nObjectsCreated; yaffs_Object *freeObjects; int nFreeObjects; + + int nHardLinks; yaffs_ObjectList *allocatedObjectList;