Skip to contentSkip to conversation

No space left on device

DISCUSSION Sebastian 2 participants 5 messages Mar 19, 2002 – Mar 27, 2002 Memory technology devices (MTD)

lore
Share & tools
lore

Sebastian

author
#0 lore raw

Hi,

I'm trying to use JFFS2 on a 512K AMD (AM29F040B) flash chip (8 erase blocks) installed on the IBM Walnut board. I was able to create a JFFS2 image with mkfs.jffs2, erase the flash, and then copy the image to the flash ( about 200 bytes). I can mount the mtdblock and browse the files on the JFFS2 file system, but I cannot make any changes to the existing files or add new ones. Everytime I try to modify it I get the 'No space left on device' error. I had a quick look through the JFFS2 code and I see that there has to be at least 5 free erase blocks (+ data) for the FS to function properly ... but I have 8! I tried changing JFFS2_RESERVED_BLOCKS_BASE from 3 to 1 (which gives a total of 3 blocks for minimum requirement) and it still didn't work. Am I missing something here? Do I have to pad my image with 0xFF and make it 512K before I copy it? Is there another way to make the image and copy it to the flash ... etc?

Regards,
Sebastian Vaitus

#1 lore raw
Quoted 6 lines · [email protected] said:

I was able to create a JFFS2 image with mkfs.jffs2, erase the flash,
and then copy the image to the flash ( about 200 bytes). I can mount the mtdblock and browse the files on the JFFS2 file system, but I cannot make any changes to the existing files or add new ones. Everytime I try to modify it I get the 'No space left on device' error.

Please compile with CONFIG_JFFS2_FS_DEBUG=1, set the console loglevel to 9 so that you see all the KERN_DEBUG messages, and log the output over a serial console while you reproduce this and also run 'df'.

--
dwmw2

author
#2 lore raw

David,

I have logged the output for the problem described in a previous email (attached below). I am using 6 erase blocks this time instead of 8 (which should still be enough for the 280 byte JFFS2 image). From what I saw in the logs, I think that JFFS is only able to use the first block out of the 6 due to some formatting or erasing problem with the rest of 5 blocks. Please have a look at the attached log and maybe you'll be able to easily identify the problem..

Regards,
Sebastian

Quoted 23 lines
Quoted 6 lines · [email protected] said:

I was able to create a JFFS2 image with mkfs.jffs2, erase the flash,
and then copy the image to the flash ( about 200 bytes). I can mount the mtdblock and browse the files on the JFFS2 file system, but I cannot make any changes to the existing files or add new ones. Everytime I try to modify it I get the 'No space left on device' error.

Please compile with CONFIG_JFFS2_FS_DEBUG=1, set the console loglevel to 9 so that you see all the KERN_DEBUG messages, and log the output over a serial console while you reproduce this and also run 'df'.

--
dwmw2

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

author
#4 lore raw

It's a 512K AMD flash with 8 erase blocks on an IBM Walnut board. The ROM Monitor program which I use for booting takes up the last 2 blocks, and I'm trying to use the first 6 blocks for JFFS.
I've attached a previous email below that gives more details.

Sebastian

Hi,

I'm trying to use JFFS2 on a 512K AMD (AM29F040B) flash chip (8 erase blocks) installed on the IBM Walnut board. I was able to create a JFFS2 image with mkfs.jffs2, erase the flash, and then copy the image to the flash ( about 200 bytes). I can mount the mtdblock and browse the files on the JFFS2 file system, but I cannot make any changes to the existing files or add new ones. Everytime I try to modify it I get the 'No space left on device' error. I had a quick look through the JFFS2 code and I see that there has to be at least 5 free erase blocks (+ data) for the FS to function properly ... but I have 8! I tried changing JFFS2_RESERVED_BLOCKS_BASE from 3 to 1 (which gives a total of 3 blocks for minimum requirement) and it still didn't work. Am I missing something here? Do I have to pad my image with 0xFF and make it 512K before I copy it? Is there another way to make the image and copy it to the flash ... etc?

Regards,
Sebastian Vaitus

Quoted 17 lines
Quoted 2 lines · [email protected] said:

Erase at 0x00010000 finished, but state != MTD_ERASE_DONE. State is 0x0 instead.

What hardware?

--
dwmw2

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/