JFFS2 partition full issue

bon chen bonapply at gmail.com
Tue Dec 10 04:19:18 EST 2013


Hi there,

We met a failure for writing date to jffs2 partition,
but the partition is shown not full via "df".

Sometimes, the embdedded system run overnight,
when cp some file to JFFS2 partition we found bellow message
"cp: can't create '/xxx/xxx: No space left on device"


found that if the message "Newly-erased block contained word xxxx at
offset xxxx" happened once,
then no longer to write date to  jffs2 partition partition, only
reboot system could recover.

trace the kernel code, the message is printed in
kernel/ti/linux-2.6.39.3/src/fs/jffs2/erase.c
===
static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct
jffs2_eraseblock *jeb, uint32_t *bad_offset)
{
...
for (i=0; i<readlen; i += sizeof(unsigned long)) {
/* It's OK. We know it's properly aligned */
unsigned long *datum = ebuf + i;
if (*datum + 1) {
*bad_offset += i;
printk(KERN_WARNING "<2>Newly-erased block contained word 0x%lx at
offset 0x%08x\\n", *datum, *bad_offset);
ret = -EIO;
goto fail;
}
}

...
}
===

Are there any patch or solution to fix this issue ?

Thanks in advance.
Jonathan



More information about the linux-mtd mailing list