yaffs_HardLinkStructure hardLinkVariant;
} yaffs_ObjectVariant;
+
+
struct yaffs_ObjectStruct {
__u8 deleted:1; /* This should only apply to unlinked files. */
__u8 softDeleted:1; /* it has also been soft deleted */
* until the inode is released.
*/
__u8 beingCreated:1; /* This object is still being created so skip some checks. */
+ __u8 isShadowed:1; /* This object is shadowed on the way to being renamed. */
__u8 serial; /* serial number of chunk in NAND. Cached here */
__u16 sum; /* sum of the name to speed searching */
YCHAR shortName[YAFFS_SHORT_NAME_LENGTH + 1];
#endif
-#ifndef __KERNEL__
- __u32 inUse;
-#endif
-
#ifdef CONFIG_YAFFS_WINCE
__u32 win_ctime[2];
__u32 win_mtime[2];
__u32 yst_rdev;
-#ifdef __KERNEL__
- struct inode *myInode;
-
-#endif
+ void *myInode;
yaffs_ObjectType variantType;
/*----------------- Device ---------------------------------*/
+
struct yaffs_DeviceStruct {
struct ylist_head devList;
const char *name;
int useHeaderFileSize; /* Flag to determine if we should use file sizes from the header */
- int useNANDECC; /* Flag to decide whether or not to use NANDECC */
+ int useNANDECC; /* Flag to decide whether or not to use NANDECC on data (yaffs1) */
+ int noTagsECC; /* Flag to decide whether or not to do ECC on packed tags (yaffs2) */
+
+ int disableLazyLoad; /* Disable lazy loading on this device */
void *genericDevice; /* Pointer to device context
* On an mtd this holds the mtd pointer.
int isYaffs2;
/* The removeObjectCallback function must be supplied by OS flavours that
- * need it. The Linux kernel does not use this, but yaffs direct does use
- * it to implement the faster readdir
+ * need it.
+ * yaffs direct uses it to implement the faster readdir.
+ * Linux uses it to protect the directory during unlocking.
*/
void (*removeObjectCallback)(struct yaffs_ObjectStruct *obj);
struct semaphore sem; /* Semaphore for waiting on erasure.*/
struct semaphore grossLock; /* Gross locking semaphore */
+ struct rw_semaphore dirLock; /* Lock the directory structure */
__u8 *spareBuffer; /* For mtdif2 use. Don't know the size of the buffer
* at compile time so we have to allocate it.
+
*/
void (*putSuperFunc) (struct super_block *sb);
+ struct ylist_head searchContexts;
+
#endif
int isMounted;
/* yaffs2 runtime stuff */
unsigned sequenceNumber; /* Sequence number of currently allocating block */
unsigned oldestDirtySequence;
-
+
+ /* Auto empty lost and found directory on mount */
+ int emptyLostAndFound;
};
typedef struct yaffs_DeviceStruct yaffs_Device;
yaffs_Object *yaffs_MknodFile(yaffs_Object *parent, const YCHAR *name,
__u32 mode, __u32 uid, __u32 gid);
-int yaffs_FlushFile(yaffs_Object *obj, int updateTime);
+
+int yaffs_FlushFile(yaffs_Object *obj, int updateTime, int dataSync);
/* Flushing and checkpointing */
void yaffs_FlushEntireDeviceCache(yaffs_Device *dev);