FDs not closed in FUSE filesystem

Posted by cor on Stack Overflow See other posts from Stack Overflow or by cor
Published on 2010-05-27T11:06:48Z Indexed on 2010/05/27 11:11 UTC
Read the original article Hit count: 183

Hi,

I have a problem while implementing a fuse filesystem in python. for now i just have a proxy filesystem, exactly like a mount --bind would be.

But, any file created, opened, or read on my filesystem is not released (the corresponding FD is not closed)

Here is an example :

yume% ./ProxyFs.py `pwd`/test
yume% cd test
yume% ls
mdr
yume% echo test > test
yume% ls
mdr  test
yume% ps auxwww | grep python
cor      22822  0.0  0.0  43596  4696 ?        Ssl  12:57   0:00 python ./ProxyFs.py /home/cor/esl/proxyfs/test
cor      22873  0.0  0.0   6352   812 pts/1    S+   12:58   0:00 grep python
yume% ls -l /proc/22822/fd
total 0
lrwx------ 1 cor cor 64 2010-05-27 12:58 0 -> /dev/null
lrwx------ 1 cor cor 64 2010-05-27 12:58 1 -> /dev/null
lrwx------ 1 cor cor 64 2010-05-27 12:58 2 -> /dev/null
lrwx------ 1 cor cor 64 2010-05-27 12:58 3 -> /dev/fuse
l-wx------ 1 cor cor 64 2010-05-27 12:58 4 -> /home/cor/test/test
yume%

Does anyone have a solution to actually really close the fds of the file I use in my fs ?

I'm pretty sure it's a mistake in the implementation of the open, read, write hooks but i'm stucked...

Let me know if you need more details !

Thanks a lot

Cor

© Stack Overflow or respective owner

Related posts about python

Related posts about unix