[PATCH] [JFFS2] Non-contiguous write bug fix (Sibley)
Alexander Belyakov
abelyako at googlemail.com
Tue Apr 17 07:14:29 EDT 2007
Yes, the bug still exists. The patch fixes JFFS2 non-contiguous write
error on Sibley.
Signed-off-by: Alexander Belyakov <alexander.belyakov at intel.com>
---
diff -uNr a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
--- a/fs/jffs2/wbuf.c 2007-03-23 22:52:51.000000000 +0300
+++ b/fs/jffs2/wbuf.c 2007-04-06 14:06:16.000000000 +0400
@@ -755,6 +755,13 @@
memset(c->wbuf,0xff,c->wbuf_pagesize);
}
+ /* Fixup the wbuf if we are moving to a new eraseblock */
+ if (((c->wbuf_ofs % c->sector_size) == 0) && !c->wbuf_len) {
+ c->wbuf_ofs = PAGE_DIV(to);
+ c->wbuf_len = PAGE_MOD(to);
+ memset(c->wbuf,0xff,c->wbuf_pagesize);
+ }
+
/*
* Sanity checks on target address. It's permitted to write
* at PAD(c->wbuf_len+c->wbuf_ofs), and it's permitted to
More information about the linux-mtd
mailing list