X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.h;h=c58c84bf1f29962c1fcc74ab7596e7942a35330f;hp=853fea60200bd1e5082dd4129e3fb19f712f632d;hb=0b1ba3425bc7b91f718fd95d679d48187501d403;hpb=1ffa02489a63129109b66774681c94fe0a8a946a diff --git a/yaffs_guts.h b/yaffs_guts.h index 853fea6..c58c84b 100644 --- a/yaffs_guts.h +++ b/yaffs_guts.h @@ -405,6 +405,8 @@ typedef union { 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 */ @@ -424,6 +426,7 @@ struct yaffs_ObjectStruct { * 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 */ @@ -531,6 +534,7 @@ typedef struct { /*----------------- Device ---------------------------------*/ + struct yaffs_DeviceStruct { struct ylist_head devList; const char *name; @@ -559,6 +563,8 @@ struct yaffs_DeviceStruct { 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. @@ -593,8 +599,9 @@ struct yaffs_DeviceStruct { 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); @@ -634,10 +641,14 @@ struct yaffs_DeviceStruct { 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; @@ -765,7 +776,9 @@ struct yaffs_DeviceStruct { /* 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;