diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2009-08-07 17:02:55 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2009-08-07 17:02:55 (GMT) |
commit | 13865ca284e1c05069ae9e37cbd9e35a95e3e22a (patch) | |
tree | 7bbafe8cf32d3369b6301f0d1b3ddabf21cd9dbc /FuseArchive/FileSystem.py | |
parent | a6fd32baae39a6171ea1d170ba597d667cf357e6 (diff) | |
download | fusearchive-13865ca284e1c05069ae9e37cbd9e35a95e3e22a.zip fusearchive-13865ca284e1c05069ae9e37cbd9e35a95e3e22a.tar.gz fusearchive-13865ca284e1c05069ae9e37cbd9e35a95e3e22a.tar.bz2 |
Added a method to free blocks before unlink, just doing ftruncate then
unlink left the "empty" file and "empty" block with an extra ref for every
unlink since we never freed those blocks
Diffstat (limited to 'FuseArchive/FileSystem.py')
-rw-r--r-- | FuseArchive/FileSystem.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/FuseArchive/FileSystem.py b/FuseArchive/FileSystem.py index 16e5b2c..dfb5515 100644 --- a/FuseArchive/FileSystem.py +++ b/FuseArchive/FileSystem.py @@ -47,9 +47,9 @@ class FileSystem(fuse.Fuse): yield fuse.Direntry(e) def unlink(self, path): - # Do a truncate to free our chunks + # Ask our file to release it's chunks f = ChunkFile( path, os.O_RDWR, 0 ) - f.ftruncate( 0 ) + f.pre_unlink() f.release( 0 ) os.unlink("./tree" + path) |