public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] [JFFS2] Non-contiguous write bug fix (Sibley)
@ 2007-04-17 11:14 Alexander Belyakov
  2007-04-18 15:06 ` David Woodhouse
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Belyakov @ 2007-04-17 11:14 UTC (permalink / raw)
  To: linux-mtd

Yes, the bug still exists. The patch fixes JFFS2 non-contiguous write
error on Sibley.

Signed-off-by: Alexander Belyakov <alexander.belyakov@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-05-04 11:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-17 11:14 [PATCH] [JFFS2] Non-contiguous write bug fix (Sibley) Alexander Belyakov
2007-04-18 15:06 ` David Woodhouse
2007-04-19 13:59   ` Alexander Belyakov
2007-05-02 13:49   ` Alexander Belyakov
2007-05-02 13:58     ` David Woodhouse
2007-05-02 14:53       ` Alexander Belyakov
2007-05-02 17:10         ` David Woodhouse
2007-05-03  9:31           ` Alexander Belyakov
2007-05-04 11:52             ` Alexander Belyakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox