X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.h;h=9cd554e7577b726b2ff2ff9ee93b7509c7f0323e;hp=231f8ac567eb86e3583f4c1fc436e9c89a4ca2c8;hb=ba5e2f04db2bf57788cf6e326f54bd858296c29e;hpb=30f956c32c235e6b5fa77fb29965ababbd497561 diff --git a/yaffs_guts.h b/yaffs_guts.h index 231f8ac..9cd554e 100644 --- a/yaffs_guts.h +++ b/yaffs_guts.h @@ -167,6 +167,12 @@ enum yaffs_ecc_result { YAFFS_ECC_RESULT_UNFIXED }; +/* + * Object type enum: + * When this is stored in flash we store it as a u32 instead + * to prevent any alignment change issues as compiler variants change. + */ + enum yaffs_obj_type { YAFFS_OBJECT_TYPE_UNKNOWN, YAFFS_OBJECT_TYPE_FILE, @@ -310,7 +316,7 @@ struct yaffs_block_info { /* This is the object structure as stored on NAND */ struct yaffs_obj_hdr { - enum yaffs_obj_type type; + u32 type; /* enum yaffs_obj_type */ /* Apply to everything */ int parent_obj_id; @@ -368,9 +374,19 @@ struct yaffs_tnode { * - a hard link */ +/* The file variant has three file sizes: + * - file_size : size of file as written into Yaffs - including data in cache. + * - stored_size - size of file as stored on media. + * - shrink_size - size of file that has been shrunk back to. + * + * The stored_size and file_size might be different because the data written + * into the cache will increase the file_size but the stored_size will only + * change when the data is actually stored. + * + */ struct yaffs_file_var { loff_t file_size; - loff_t scanned_size; + loff_t stored_size; loff_t shrink_size; int top_level; struct yaffs_tnode *top; @@ -470,7 +486,7 @@ struct yaffs_obj { void *my_inode; - enum yaffs_obj_type variant_type; + u32 variant_type; /* enum yaffs_object_type */ union yaffs_obj_var variant; @@ -490,7 +506,7 @@ struct yaffs_checkpt_obj { u32 obj_id; u32 parent_id; int hdr_chunk; - enum yaffs_obj_type variant_type:3; + u32 variant_type:3; /* enum yaffs_obj_type */ u8 deleted:1; u8 soft_del:1; u8 unlinked:1; @@ -563,6 +579,8 @@ struct yaffs_param { * 0 = no limit. */ + int hide_lost_n_found; /* Set non-zero to hide the lost-n-found dir. */ + /* The remove_obj_fn function must be supplied by OS flavours that * need it. * yaffs direct uses it to implement the faster readdir.