public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Append does not return error on full disks
@ 2002-05-28 12:30 Frederic Giasson
  2002-05-28 13:09 ` tkeitel
  2002-05-28 13:20 ` David Woodhouse
  0 siblings, 2 replies; 4+ messages in thread
From: Frederic Giasson @ 2002-05-28 12:30 UTC (permalink / raw)
  To: 'linux-mtd@lists.infradead.org'

Hi,

	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
full.

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

Frédéric Giasson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Append does not return error on full disks
  2002-05-28 12:30 Append does not return error on full disks Frederic Giasson
@ 2002-05-28 13:09 ` tkeitel
  2002-05-28 13:20 ` David Woodhouse
  1 sibling, 0 replies; 4+ messages in thread
From: tkeitel @ 2002-05-28 13:09 UTC (permalink / raw)
  To: linux-mtd, linux-mtd

On Tue, May 28, 2002 at 08:30:03 -0400, Frederic Giasson wrote:
> Hi,
> 
> 	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
> full.
> 
> 	Does anyone have a clue about it?  Maybe there is a bug somewhere
> down in the jffs2_reserve_space() function?
> 

What version of JFFS2 did you use?

-- 
tino.keitel@innominate.com
dipl.-inf.                        Innominate Security Technologies AG
software engineer                                   networking people
tel: +49.30.6392-3308                      http://www.innominate.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Append does not return error on full disks
  2002-05-28 12:30 Append does not return error on full disks Frederic Giasson
  2002-05-28 13:09 ` tkeitel
@ 2002-05-28 13:20 ` David Woodhouse
  1 sibling, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2002-05-28 13:20 UTC (permalink / raw)
  To: Frederic Giasson; +Cc: 'linux-mtd@lists.infradead.org'

fgiasson@mediatrix.com said:
> 	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. 

Eep. Can you reproduce this with the current code from either the trunk or 
the jffs2-2_4-branch, and with CONFIG_JFFS2_FS_DEBUG=1, logging all the 
messages via a serial console?

> 	During my test, I did'nt open the file with OSYNC flag though, maybe
> it could patch the problem.  I will try it.

Doesn't matter. O_SYNC does nothing -- it's always synchronous anyway.


--
dwmw2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Append does not return error on full disks
@ 2002-05-29 14:55 Frederic Giasson
  0 siblings, 0 replies; 4+ messages in thread
From: Frederic Giasson @ 2002-05-29 14:55 UTC (permalink / raw)
  To: 'tkeitel@innominate.com'; +Cc: 'linux-mtd@lists.infradead.org'

>What version of JFFS2 did you use?

I use code from MTD CVS took on May22th.

Frederic Giasson 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-05-29 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-28 12:30 Append does not return error on full disks Frederic Giasson
2002-05-28 13:09 ` tkeitel
2002-05-28 13:20 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2002-05-29 14:55 Frederic Giasson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox