Unlinking large files in IMFS
Joel Sherrill
joel.sherrill at OARcorp.com
Fri Mar 23 13:44:16 UTC 2001
Just so everyone will know. This bug was previously reported by
Jose Sturniolo <jsturnio at nec.com.ar> and the fix is in 4.5.0.
By accident, the same patch was not applied to the development
branch and thus was missing in snapshots.
--joel
Andy Dachs wrote:
>
> I just updated my MPC8260 BSP to work with the rtems-ss-20010126 snapshot. Its still a little rough around the edges but I came across a problem unlinking large files which I don't think is related to my BSP. I saw similar symptoms with the beta3a release but never investigated fully.
>
> Attached is a small test routine to demonstrate the problem. Modify the NUM_BLOCKS value to get different file sizes (a value of 264 or above should generate the assertion).
>
> Writing a 128k file and then calling unlink() is fine:
>
> *** CRASH TEST, dummy? ***
> Writing file of 131584 bytes
> Written file
> Now trying to unlink it
> Success
>
> Going to 135168 bytes generates an error:
>
> *** CRASH TEST, dummy? ***
> Writing file of 135168 bytes
> Written file
> Now trying to unlink it
> assertion "0" failed: file "../../../../../../rtems-ss-20010126-afd/c/src/lib/libc/malloc.c", line 323
>
> Just below that number is fine again:
>
> *** CRASH TEST, dummy? ***
> Writing file of 134656 bytes
> Written file
> Now trying to unlink it
> Success
>
> I should have enough heap (4M) so I don't think that's a problem. By my calculations 135168 bytes is the magic number where triply indirect blocks would be required (for a filesystem using 128 byte blocks) so could it be related to that?
>
> Any suggestions?
>
> Andy
>
> _______________________________________________________________________
> FSmail - Get your free web-based email from Freeserve: www.fsmail.net
>
> ------------------------------------------------------------------------
> Name: system.h
> system.h Type: unspecified type (application/octet-stream)
> Encoding: base64
>
> Name: init.c
> init.c Type: unspecified type (application/octet-stream)
> Encoding: base64
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list