Skip Menu |

This queue is for tickets about the Fuse CPAN distribution.

Report information
The Basics
Id: 55953
Status: resolved
Priority: 0/
Queue: Fuse

People
Owner: DPAVLIN [...] cpan.org
Requestors: CYGA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.09
Fixed in: 0.11



Subject: readdir isn't implemented
readdir isn't implemented I saw: --snip #if 0 /* * This doesn't yet work... we alwas get ENOSYS when trying to use readdir(). * Well, of course, getdir() is fine as well. */ int _PLfuse_readdir(const char *file, void *dirh, fuse_fill_dir_t dirfil, off_t off, struct fuse_file_info *fi) { #endif --snap But it's a big problem: while reading huge directory perl will "eat" a lot of memory for data structures used to store all directory entries & it won't return it to the system after :( I checked changelog at fuse project wiki: http://sourceforge.net/apps/mediawiki/fuse/index.php?title=ApiChangelog --snip API 23: ... - getdir is deprecated in favor of readdir --snap May be, we can implement it now? I can try to add such a code, but I'm not an experienced XS coder. Please clarify situation.
From: daniel.frett [...] ccci.org
On Fri Mar 26 01:45:34 2010, CYGA wrote: Show quoted text
> readdir isn't implemented > > I saw: > --snip > #if 0 > /* > * This doesn't yet work... we alwas get ENOSYS when trying to use > readdir(). > * Well, of course, getdir() is fine as well. > */ > int _PLfuse_readdir(const char *file, void *dirh, fuse_fill_dir_t > dirfil, off_t off, struct fuse_file_info *fi) { > #endif > --snap > > But it's a big problem: > while reading huge directory perl will "eat" a lot of memory for data > structures used to store all directory entries & it > won't return it to the system after :( > > I checked changelog at fuse project wiki: > http://sourceforge.net/apps/mediawiki/fuse/index.php?title=ApiChangelog > --snip > API 23: > ... > - getdir is deprecated in favor of readdir > --snap > May be, we can implement it now? > I can try to add such a code, but I'm not an experienced XS coder. > > Please clarify situation.
I'm taking a guess that readdir doesn't work because FUSE_USE_VERSION isn't being defined, so fuse defaults to API level 21, which is before readdir was supported.
inline On Thu Feb 24 11:51:31 2011, dfrett wrote: Show quoted text
> On Fri Mar 26 01:45:34 2010, CYGA wrote:
> > readdir isn't implemented > > > > I saw: > > --snip > > #if 0 > > /* > > * This doesn't yet work... we alwas get ENOSYS when trying to use > > readdir(). > > * Well, of course, getdir() is fine as well. > > */ > > int _PLfuse_readdir(const char *file, void *dirh, fuse_fill_dir_t > > dirfil, off_t off, struct fuse_file_info *fi) { > > #endif > > --snap > > > > But it's a big problem: > > while reading huge directory perl will "eat" a lot of memory for
> data
> > structures used to store all directory entries & it > > won't return it to the system after :( > > > > I checked changelog at fuse project wiki: > >
> http://sourceforge.net/apps/mediawiki/fuse/index.php?title=ApiChangelog
> > --snip > > API 23: > > ... > > - getdir is deprecated in favor of readdir > > --snap > > May be, we can implement it now? > > I can try to add such a code, but I'm not an experienced XS coder. > > > > Please clarify situation.
> > I'm taking a guess that readdir doesn't work because FUSE_USE_VERSION > isn't being defined, > so fuse defaults to API level 21, which is before readdir was > supported.
No. There is no readdir neither in Fuse.pm nor in Fuse.xs. It was commented in Fuse.xs and mentioned in Fuse.pm. But wasn't implemented. I added simple wrap for it. Patch is attached. It would be nice if somebody will check it's xs code and apply it to mainstream. I used such patched solution for about half an year already.
Subject: readdir.patch.gz
Download readdir.patch.gz
application/x-gzip 2.7k

Message body not shown because it is not plain text.

Thanks. I commited your changes in branch on github https://github.com/dpavlin/perl-fuse/tree/rt-55953-readdir which is based off version 0.09. It still needs few changes to be in sync with threading changes in current master. Unfortunately I won't be able to give this a try, at least for another week.
From: daniel.frett [...] ccci.org
On Thu Feb 24 17:27:39 2011, DPAVLIN wrote: Show quoted text
> Thanks. I commited your changes in branch on github > > https://github.com/dpavlin/perl-fuse/tree/rt-55953-readdir > > which is based off version 0.09. It still needs few changes to be in > sync with threading changes in current master. > > Unfortunately I won't be able to give this a try, at least for another week.
I merged the current master with it and addressed the threading changes for the callback, I pushed the merge up to a branch on github. it compiles and runs the built-in test suite fine, but I didn't try the readdir example to make sure the new callbacks are truly working.