jffs2_flash_writev(): Non-contiguous write to 00825300 with mtd_dataflash
Haavard Skinnemoen
hskinnemoen at atmel.com
Tue Nov 28 06:58:10 EST 2006
On Mon, 13 Nov 2006 09:46:49 +0200
Artem Bityutskiy <dedekind at infradead.org> wrote:
> On Wed, 2006-11-01 at 11:52 +0100, Haavard Skinnemoen wrote:
> > jffs2_flash_writev(): Non-contiguous write to 00825300
> > wbuf was previously 00825300-008253b8
>
> So all it seems that you need to to make jffs2_can_mark_obsokete()
> return 0 in case of dataflash.
That seems to work. Thanks, and sorry for taking so long to respond to
this.
---
From: Haavard Skinnemoen <hskinnemoen at atmel.com>
Subject: [PATCH] MTD: jffs2_can_mark_obsolete() should return 0 for dataflash
Attempting to write something to a file on a jffs2 filesystem using
mtd_dataflash often results in the following BUG:
jffs2_flash_writev(): Non-contiguous write to 00825720
wbuf was previously 00825300-0082530c
kernel BUG at /home/hskinnemoen/git/linux-devel/fs/jffs2/wbuf.c:786!
Fix this by returning 0 from jffs2_can_mark_obsolete() when running
on top of dataflash.
Signed-off-by: Haavard Skinnemoen <hskinnemoen at atmel.com>
---
fs/jffs2/os-linux.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index 9f41fc0..a037fa4 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -106,7 +106,8 @@ static inline void jffs2_init_inode_info
#ifdef CONFIG_JFFS2_SUMMARY
#define jffs2_can_mark_obsolete(c) (0)
#else
-#define jffs2_can_mark_obsolete(c) (c->mtd->flags & (MTD_BIT_WRITEABLE))
+#define jffs2_can_mark_obsolete(c) (c->mtd->flags & (MTD_BIT_WRITEABLE) \
+ && !jffs2_dataflash(c))
#endif
#define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH)
--
1.4.3.3
More information about the linux-mtd
mailing list