[Tux3] Question on Tux3 Fuse
Tero Roponen
tero.roponen at gmail.com
Thu Sep 25 05:13:07 PDT 2008
On Thu, 25 Sep 2008, Tero Roponen wrote:
>
> Oh, I was testing tux3fuse, not tux3fs. With tux3fs I get this:
>
> [terrop at terrop mnt]$ ls
> [terrop at terrop mnt]$ touch hi
> [terrop at terrop mnt]$ ls
> hi
> [terrop at terrop mnt]$ rm hi
> [terrop at terrop mnt]$ ls
> ls: reading directory .: Input/output error
>
> > I think this is because the dirent buffer used in tux3_readdir function.
> > That is being used uninitialized. It is not being filled up in ext2_readdir using the
> > tux3_filler function.
> > This is as far as i got. Hope this helps.
>
> I'm not familiar with the high level fuse API, but I'll see if
> I can find anything suspicious.
This is probably not a correct fix, but this seems to work:
[terrop at terrop mnt]$ ls
[terrop at terrop mnt]$ touch hi
[terrop at terrop mnt]$ ls
hi
[terrop at terrop mnt]$ rm hi
[terrop at terrop mnt]$ ls
[terrop at terrop mnt]$ touch foo bar baz
[terrop at terrop mnt]$ ls
bar baz foo
[terrop at terrop mnt]$ rm *
[terrop at terrop mnt]$ ls
[terrop at terrop mnt]$
diff -r a4f53110d9bf user/test/tux3fs.c
--- a/user/test/tux3fs.c Wed Sep 24 10:12:24 2008 -0700
+++ b/user/test/tux3fs.c Thu Sep 25 15:09:10 2008 +0300
@@ -192,6 +192,8 @@
struct stat stat;
if ((errno = -ext2_readdir(dirfile, &(struct fillstate){ .dirent = dirent }, tux3_filler)))
return -errno;
+ if (!*dirent)
+ return -ENOENT;
tux3_getattr(dirent, &stat);
if (fuse_filler(buf, dirent, &stat, dirfile->f_pos)) {
warn("fuse buffer full");
--
Tero Roponen
-------------- next part --------------
_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3
More information about the Tux3
mailing list