joedj / ftpii

An FTP server for the Nintendo Wii
Other
52 stars 18 forks source link

Deleting files does not reclaim free space #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Delete a file

What is the expected output? What do you see instead?
I would expect space to be freed, but the free space remains the same, while 
the file disappears.

What version of the product are you using? On what operating system?
0.0.9

Please provide any additional information below.
I'm using Cyberduck (latest, 3.0.1) on OSX (10.5.4).  Sticking the SD in my 
computer confirms that the file is gone and 
space isn't reclaimed.  Deleting additional stuff in the computer (direct USB 
reader) frees space for those files, but the 
phantom space is still there.  I ran a repair in Disk Utility which reclaimed 
the space, with this in the log:

Starting repair tool:  2008-07-15 23:39:43 -0700
2008-07-15 23:39:45 -0700: ** /dev/disk2s1
2008-07-15 23:39:45 -0700: ** Phase 1 - Preparing FAT
2008-07-15 23:39:45 -0700: ** Phase 2 - Checking Directories
2008-07-15 23:39:45 -0700: ** Phase 3 - Checking for Orphan Clusters
2008-07-15 23:39:45 -0700: Found orphan cluster(s)
2008-07-15 23:39:46 -0700: Fix? yes
2008-07-15 23:39:46 -0700: Marked 87089 clusters as free
2008-07-15 23:39:46 -0700: Free space in FSInfo block (160414) not correct 
(247503)
2008-07-15 23:39:46 -0700: Fix? yes
2008-07-15 23:39:46 -0700: 0 files, 990012 KiB free (247503 clusters)
2008-07-15 23:39:46 -0700: 
2008-07-15 23:39:46 -0700: ***** FILE SYSTEM WAS MODIFIED *****
Repair tool completed:  2008-07-15 23:39:47 -0700

Original issue reported on code.google.com by bck...@som.umass.edu on 16 Jul 2008 at 7:18

GoogleCodeExporter commented 9 years ago
Thanks for the bug report!

This indeed sounds like a serious issue, I have not had time to play around and
reproduce it but the report looks pretty conclusive.

Unfortunately, this will be a bug in libfat, rather than ftpii as such (we just 
call
unlink()).  I will try to resolve this quickly, but I'm not currently familiar 
with
the libfat code or the low-level details of the FAT filesystem...

Original comment by joe.goo...@psychlaw.com.au on 20 Jul 2008 at 9:25

GoogleCodeExporter commented 9 years ago
I reproduced this bug and another, the problem is that it corrupt the FAT, so 
to 
reclaim the space you have to run a scandisk (or any other tools)
I also had a FAT corrupted by trying to rename a file (long file name), I got 
several message 550 No such file or directory, but eventually the whole 
directory 
disapear and all the files in it was corrupted.

Original comment by pow...@gmail.com on 31 Jul 2008 at 1:33

GoogleCodeExporter commented 9 years ago
Note : 

I'm using Leap FTP 3.0 (Windows Client)
Windows XP SP3
ftpii version : 0.0.12

Original comment by pow...@gmail.com on 31 Jul 2008 at 1:37

GoogleCodeExporter commented 9 years ago
Have the same problem with version 0.0.12 using cute ftp pro 8

Original comment by leo.gd...@gmail.com on 7 Aug 2008 at 5:18

GoogleCodeExporter commented 9 years ago
I can confirm the exact same issue with cyberduck on OS X 10.5.4, and also tried
using FireFTP (firefox extension) with the same results.

Original comment by miles.se...@gmail.com on 13 Aug 2008 at 6:11

GoogleCodeExporter commented 9 years ago
Hi. I also have the same problem. Using Windows XP and Servant Salamander FTP 
Client. The bad thing is that I must remove the card and look for a reader 
everytime 
I want to delete a file. That's weird.

Original comment by daniel.a...@gmail.com on 16 Aug 2008 at 8:31

GoogleCodeExporter commented 9 years ago
I'm having the same problem and I'm using FileZilla on Windows XP Pro SP3.

I don't know a whole lot of what I'm talking about but the SD Explorer homebrew 
has
the same problem, so I think it is indeed an error with libfat rather than 
FTPii.

I hope they solve this soon.

Original comment by Deoz...@gmail.com on 20 Aug 2008 at 12:53

GoogleCodeExporter commented 9 years ago
I found a really ghetto workaround, but I've only tested it once just now so 
I'm not sure how reliable it is.

Instead of deleting files, replacing/overwriting them (using the same filename) 
seems to work.  I only tested with 
files, I have no clue if it works with whole folders, and only tested with 
Cyberduck.

I'm basically just using MPlayer to watch some videos, so when I'm done 
watching something I just replace it with 
another one.  If you just want to flat out delete something big, I guess you 
can use some small placeholder file 
(like a text file) to replace it.

Original comment by bck...@som.umass.edu on 20 Aug 2008 at 8:21

GoogleCodeExporter commented 9 years ago
This bug is now fixed in ftpii 0.0.14.

It was built using the latest libfat CVS which incorporates rodries' patches 
for this
issue.  Yay!

Original comment by joe.goo...@psychlaw.com.au on 18 Sep 2008 at 1:30