X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.h;h=e3558c5a6d04385492eb896e2c2cf429d5547322;hp=a063776913780d65dfa9ff20e45df468e9c0f726;hb=d9cae0a277c62c660e4802d3b8745500583273da;hpb=20de150d680c2a84c4a2e0d5f0f354274c7ff9ab diff --git a/yaffs_guts.h b/yaffs_guts.h index a063776..e3558c5 100644 --- a/yaffs_guts.h +++ b/yaffs_guts.h @@ -49,7 +49,10 @@ #define YAFFS_TNODES_INTERNAL_BITS (YAFFS_TNODES_LEVEL0_BITS - 1) #define YAFFS_TNODES_INTERNAL_MASK 0x7 #define YAFFS_TNODES_MAX_LEVEL 8 - +#define YAFFS_TNODES_MAX_BITS (YAFFS_TNODES_LEVEL0_BITS + \ + YAFFS_TNODES_INTERNAL_BITS * \ + YAFFS_TNODES_MAX_LEVEL) +#define YAFFS_MAX_CHUNK_ID ((1 << YAFFS_TNODES_MAX_BITS) - 1) /* Constants for YAFFS1 mode */ #define YAFFS_BYTES_PER_SPARE 16 @@ -61,7 +64,7 @@ #define YAFFS_MIN_YAFFS2_CHUNK_SIZE 1024 #define YAFFS_MIN_YAFFS2_SPARE_SIZE 32 -#define YAFFS_MAX_CHUNK_ID 0x000fffff + #define YAFFS_ALLOCATION_NOBJECTS 100 #define YAFFS_ALLOCATION_NTNODES 100 @@ -72,7 +75,9 @@ #define YAFFS_OBJECT_SPACE 0x40000 #define YAFFS_MAX_OBJECT_ID (YAFFS_OBJECT_SPACE - 1) -#define YAFFS_CHECKPOINT_VERSION 5 +/* Binary data version stamps */ +#define YAFFS_SUMMARY_VERSION 1 +#define YAFFS_CHECKPOINT_VERSION 6 #ifdef CONFIG_YAFFS_UNICODE #define YAFFS_MAX_NAME_LENGTH 127 @@ -531,7 +536,7 @@ struct yaffs_param { */ int use_nand_ecc; /* Flag to decide whether or not to use * NAND driver ECC on data (yaffs1) */ - int tags_9bytes; /* Use 9 byte tags */ + int tags_9bytes; /* Use 9 byte tags */ int no_tags_ecc; /* Flag to decide whether or not to do ECC * on packed tags (yaffs2) */ @@ -600,6 +605,11 @@ struct yaffs_param { int always_check_erased; /* Force chunk erased check always on */ int disable_summary; + + int max_objects; /* + * Set to limit the number of objects created. + * 0 = no limit. + */ }; struct yaffs_dev { @@ -957,5 +967,7 @@ void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr, */ void yaffs_oh_size_load(struct yaffs_obj_hdr *oh, loff_t fsize); loff_t yaffs_oh_to_size(struct yaffs_obj_hdr *oh); +loff_t yaffs_max_file_size(struct yaffs_dev *dev); + #endif