Guaranteed writable space on JFFS2?

Thomas Weber tweb at peppercon.de
Thu Jan 20 07:55:20 EST 2005


Hi,

I've a problem with JFFS2 (kernel 2.4.26) on a NOR flash with 128k blocks.
Due to previous unexpected behaviour, I've already changed

> super.c at 85:
> -       avail = c->dirty_size + c->free_size;
> +       avail = (c->dirty_size / c->sector_size) * c->sector_size + c->free_size;

as GC returns ENOSPC on dirty size < sector size. This occurs quite 
often on a nearly full fs with 128k blocks.
By now, e.g. df provides the physical free space, but I do not know how 
much of this space is really writable, since I do not know how much is 
necessary file system organisation, inodes, etc.
Is there a way to predict the maximum file size, which will still be 
writable?

Thanks for your suggestions,
Thomas





More information about the linux-mtd mailing list