mtd/fs/jffs2 erase.c,1.63,1.64
jwboyer at infradead.org
jwboyer at infradead.org
Fri Nov 12 10:25:17 EST 2004
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv6709/fs/jffs2
Modified Files:
erase.c
Log Message:
Make cleanmarkers on NOR always write directly. This fixes some ECOS problems
as well.
Index: erase.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/erase.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- erase.c 11 Nov 2004 12:38:28 -0000 1.63
+++ erase.c 12 Nov 2004 15:25:14 -0000 1.64
@@ -387,6 +387,7 @@
jeb->dirty_size = 0;
jeb->wasted_size = 0;
} else {
+ struct iovec vecs[1];
struct jffs2_unknown_node marker = {
.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK),
.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
@@ -395,15 +396,9 @@
marker.hdr_crc = cpu_to_je32(crc32(0, &marker, sizeof(struct jffs2_unknown_node)-4));
- /* We only write the header; the rest was noise or padding anyway */
- /* Q: why can't we use jffs2_flash_write?
- A: because we aren't holding alloc_sem here... which is worse,
- grabbing alloc_sem to write out the marker, or just writing it...
- i think grabbing alloc_sem, so we just write it */
- if (jffs2_nor_ecc(c))
- ret = c->mtd->write(c->mtd, jeb->offset, sizeof(marker), &retlen, (char *)&marker);
- else
- ret = jffs2_flash_write(c, jeb->offset, sizeof(marker), &retlen, (char *)&marker);
+ vecs[0].iov_base = (unsigned char *) ▮
+ vecs[0].iov_len = sizeof(marker);
+ ret = jffs2_flash_direct_writev(c, vecs, 1, jeb->offset, &retlen);
if (ret) {
printk(KERN_WARNING "Write clean marker to block at 0x%08x failed: %d\n",
More information about the linux-mtd-cvs
mailing list