
Hi Baidu,
[...]
Looking over the changes, I do _see_ changes in code, so you should tell us about them.
[...]
diff --git a/include/jffs2/jffs2.h b/include/jffs2/jffs2.h index 651f94c..5b006c0 100644 --- a/include/jffs2/jffs2.h +++ b/include/jffs2/jffs2.h @@ -41,6 +41,16 @@ #include <asm/types.h> #include <jffs2/load_kernel.h>
+#ifdef CONFIG_JFFS2_SUMMARY +#ifndef CONFIG_SYS_JFFS2_SORT_FRAGMENTS +/* +we should define CONFIG_SYS_JFFS2_SORT_FRAGMENTS,if +CONFIG_JFFS2_SUMMARY is enabled. +*/ +#define CONFIG_SYS_JFFS2_SORT_FRAGMENTS +#endif +#endif
#define JFFS2_SUPER_MAGIC 0x72b6
/* Values we may expect to find in the 'magic' field */
I liked the previous version better:
diff --git a/include/jffs2/jffs2.h b/include/jffs2/jffs2.h index 651f94c..c01a76e 100644 --- a/include/jffs2/jffs2.h +++ b/include/jffs2/jffs2.h @@ -41,6 +41,17 @@ #include <asm/types.h> #include <jffs2/load_kernel.h>
+#ifdef CONFIG_JFFS2_SUMMARY +#ifndef CONFIG_SYS_JFFS2_SORT_FRAGMENTS +/*
- if we define summary in jffs2, we also need to define
- CONFIG_SYS_JFFS2_SORT_FRAGMENTS. If not, the data in latest inode may be
- overwritten by the old one.
+*/ +#error "need to define CONFIG_SYS_JFFS2_SORT_FRAGMENTS,if summary is enabled" +#endif +#endif
#define JFFS2_SUPER_MAGIC 0x72b6
Why did you change this to the worse?
If we use summary in uboot, we MUST also define CONFIG_SYS_JFFS2_SORT_FRAGMENTS. The reason is : All the inodes of a file will not marked as obsolete, if they do not sort in the list struct b_node *, the latest data in inode may be overwritten by the older one.
Yes, this is what you wrote in your first version and what I would like to see. My question was why you deleted the (helpful) comment in your second version...
Cheers Detlev