From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Wed, 27 Apr 2011 11:45:45 +0200 Subject: [U-Boot] [PATCH V2] JFFS2: bug fix for summary support. In-Reply-To: (Baidu Liu's message of "Sun, 24 Apr 2011 11:45:40 +0800") References: <001201cbfca4$2fc3fa80$6401a8c0@LENOVOE5CA6843> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >>> ?#include >>> >>> +#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 >>> ?#include >>> >>> +#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 -- Wenn ein Kopf und ein Buch zusammenstossen und es klingt hohl; ist denn das allemal im Buche? - Lichtenberg -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de