Ticket #311 (investigate bug)

Opened 14 months ago

Last modified 8 weeks ago

Disk space in JFFS filesystem not reclaimed until a reboot

Reported by: hans@… Owned by:
Priority: normal Milestone:
Component: fon-base-firmware Version:
Severity: unknown
Cc: Hardware: unknown

Description

I think there is a major bug in the FON OS (maybe in Linux)

When I overwrite a file with cp or mv there will be space taken for the new file, but the space of the old file is not released.

This space will never become available again until a reboot is done. See test underneath.

Start: /dev/mtdblock4 1472 948 524 64% /jffs

Copying test to test1 takes 16 blocks of 1K e.g. 16Kb

After: /dev/mtdblock4 1472 964 508 65% /jffs

Again copying test to test1 e.g. overwriting test1 takes another 16 blocks

After: /dev/mtdblock4 1472 980 492 67% /jffs

Renaming test1 to test e.g. overwriting test will not free the space of test1

After: /dev/mtdblock4 1472 980 492 67% /jffs

So ending with the same files I lost 32Kb disk space. You just have to wait until it will hang or crash.

complete log:

root@Fonera:/www/cam1# ls -l -rw-r--r-- 1 root root 23261 Jul 7 09:38 motion.jpg -rw-r--r-- 1 root root 16208 Jul 7 10:26 test root@Fonera:/www/cam1# df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 4096 4096 0 100% / /dev/root 4096 4096 0 100% /rom tmpfs 14956 340 14616 2% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock4 1472 948 524 64% /jffs mini_fo:/jffs 4096 4096 0 100% / root@Fonera:/www/cam1# cp test test1 root@Fonera:/www/cam1# df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 4096 4096 0 100% / /dev/root 4096 4096 0 100% /rom tmpfs 14956 340 14616 2% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock4 1472 964 508 65% /jffs mini_fo:/jffs 4096 4096 0 100% / root@Fonera:/www/cam1# ls motion.jpg test test1 root@Fonera:/www/cam1# cp test test1 root@Fonera:/www/cam1# df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 4096 4096 0 100% / /dev/root 4096 4096 0 100% /rom tmpfs 14956 340 14616 2% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock4 1472 980 492 67% /jffs mini_fo:/jffs 4096 4096 0 100% / root@Fonera:/www/cam1# ls motion.jpg test test1 root@Fonera:/www/cam1# mv test1 test root@Fonera:/www/cam1# df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 4096 4096 0 100% / /dev/root 4096 4096 0 100% /rom tmpfs 14956 340 14616 2% /tmp tmpfs 512 0 512 0% /dev /dev/mtdblock4 1472 980 492 67% /jffs mini_fo:/jffs 4096 4096 0 100% / root@Fonera:/www/cam1# ls motion.jpg test root@Fonera:/www/cam1#

Attachments

Change History

Changed 14 months ago by pm2036

OldMan? says: Looks like this only happens in the /www/ and underlying folders.

Changed 3 months ago by matthijs

  • priority changed from major to normal
  • status changed from new to investigate
  • milestone First Release deleted

This might be a limitation of the JFFS filesystem used. I'll leave this ticket open for someone to investigate. Considering that the files written to the normal flash disk should be small (big files like downloads go to USB disks or sticks), I'm setting the priority to normal.

Changed 8 weeks ago by matthijs

  • hardware set to unknown
  • severity set to unknown
  • summary changed from BUG in FON OS to Disk space in JFFS filesystem not reclaimed until a reboot

Add/Change #311 (Disk space in JFFS filesystem not reclaimed until a reboot)

Author


Please use your email address ("Name <email@adress>" or just an address) so we can contact you with further questions. Your email address will not be public.

Action
as investigate
 
Note: See TracTickets for help on using tickets.