Append does not return error on full disks

Frederic Giasson fgiasson at
Tue May 28 08:30:03 EDT 2002


	I have observed that jffs2 nevers returns a 'disk full' error when
an application appends data to an existing file.  I have setup a test which
opens an existing file for appending, and fwrite() data to it until fwrite()
returns error.
My test never stopped!  So when I manually stoppped it, the file system was
corrupted.  I was unable to unmount it, and neither I could remount it after
reboot.  I have setup a second test which is a script instead of being a
program, using the append '>>' command.  Same results. 

	During my test, I did'nt open the file with OSYNC flag though, maybe
it could patch the problem.  I will try it.
Nevertheless, it shouldn't happen that a process be able to append data
indefinitely to a file without ever getting an error when the disk becomes

	Does anyone have a clue about it?  Maybe there is a bug somewhere
down in the jffs2_reserve_space() function?

Frédéric Giasson

More information about the linux-mtd mailing list