[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CLEANMARKER obsolete, last-ic cache.



Sorry about the wordwrap. I hope this goes better otherwise it has to wait until I am back
at work. Against trunk.

I also added the "obsolete CLEANMARKER node on first write" into my 2.4 tree and
it works great. 

I would like to see this patch and  "obsolete CLEANMARKER node on first write" in the
2.4 branch very soon.

         Jocke

Index: fs/jffs2/scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.67
diff -u -r1.67 scan.c
--- fs/jffs2/scan.c     2002/03/02 22:08:27     1.67
+++ fs/jffs2/scan.c     2002/03/03 22:28:26
@@ -360,6 +360,19 @@
                                jeb->first_node = jeb->last_node = marker_ref;

                                USED_SPACE(PAD(sizeof(struct jffs2_unknown_node)));
+
+                               err = c->mtd->read(c->mtd, ofs+sizeof(struct jffs2_unknown_node),
+                                                   sizeof(node), &retlen, (char *)&node);
+                                if (node.magic == JFFS2_EMPTY_BITMASK &&
+                                    node.nodetype == JFFS2_EMPTY_BITMASK) {
+                                        /* We need to check if the first bits
+                                           after the CLEANMARKER is empty since
+                                           older FSes does not obsolete dirty EB's
+                                       */
+
+                                        ofs += c->sector_size;
+                                        break;
+                                }
                        }
                        ofs += PAD(sizeof(struct jffs2_unknown_node));
                        break;

> 
> Joakim.Tjernlund@xxxxxxx.se said:
> >  This is what I did in the 2.4 branch to test my theory. It works for
> > me, but I may be way off here.
> 
> That looks sane. I'd apply it if it wasn't word-wrapped and it was against 
> the trunk.
> 
> --
> dwmw2
> 
> 
> 
> To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
> the body of a message to majordomo@xxxxxxx.com


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com