From: Robert P <zen...@ya...> - 2008-08-13 15:37:27
|
I resolved the problem. It was the way I was interacting with fuse. Unfortunately I cannot remember how but I believe it had something flush & release. I think I was doing work in release that took too long. release appears to be asynchronous - it doesn't block the caller. So when the next cp command called getattr the getattr was serviced while the release from the previous cp was still waiting. I found that moving my work into flush blocks the caller until the work is complete. Therefore the next cp didn't run and didn't call getattr until the previous calls work had been complete. ----- Original Message ---- From: Mark Ruijter <mru...@gm...> To: Amar S. Tumballi <am...@zr...> Cc: Robert P <zen...@ya...>; fus...@li... Sent: Tuesday, August 12, 2008 2:21:42 PM Subject: Re: [fuse-devel] opcode response out of sequence Amar, Thanks for the quick response. I just tested the file system with and without 'use_ino' : Sadly in both cases the result is the same. Regards, Mark. On Tue, Aug 12, 2008 at 8:58 PM, Amar S. Tumballi <am...@zr...> wrote: I believe the problem is if you are using mount without 'use_ino' option, each different path looked up gets different inode number (mostly sequential) from libfuse, instead of st_ino of statbuf. Hence the vfs never gets to know that the files are actually hardlinks in backend. Regards, Amar 2008/8/12 Mark Ruijter <mru...@gm...> Robert, I can confirm that your file system is not the only one affected by this problem. When I test the file system that I wrote with pjd-fstest-20080412 ( http://www.ntfs-3g.org/pjd-fstest.html ) it fails on link test 8. [root@mrxen fuse]# /usr/src/pjd-fstest-20080412/tests/link/00.t 1..82 ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 not ok 8 This test repeatedly hard links and stats. The shell script below make the problem clear: #!/bin/sh -x touch file1 link file1 file2 ls -l link file2 file3 ls -l sleep 3 ls -l When I run the script this is what happens: ./linktest.sh + touch file1 + link file1 file2 + ls -l total 0 -rw-r--r-- 2 root root 0 2008-08-12 20:31 file1 -rw-r--r-- 2 root root 0 2008-08-12 20:31 file2 -rwxr-xr-x 1 root root 86 2008-08-12 20:31 linktest.sh + link file2 file3 + ls -l total 0 -rw-r--r-- 2 root root 0 2008-08-12 20:31 file1 -rw-r--r-- 3 root root 0 2008-08-12 20:31 file2 -rw-r--r-- 3 root root 0 2008-08-12 20:31 file3 -rwxr-xr-x 1 root root 86 2008-08-12 20:31 linktest.sh + sleep 3 + ls -l total 0 -rw-r--r-- 3 root root 0 2008-08-12 20:31 file1 -rw-r--r-- 3 root root 0 2008-08-12 20:31 file2 -rw-r--r-- 3 root root 0 2008-08-12 20:31 file3 -rwxr-xr-x 1 root root 86 2008-08-12 20:31 linktest.sh The same test also fails when used with: mysqlfs-0.4.0-rc1 Mark. On Mon, Aug 11, 2008 at 7:18 PM, Robert P <zen...@ya...> wrote: > After hammering my file system for a while Fuse gets an out of sequence > response and hangs. I have inserted the caller's thread id into the output. > > unique: 3200, opcode: FLUSH (25), nodeid: 2, insize: 64 > Operation from thread 3074821040 > unique: 3200, error: 0 (Success), outsize: 16 > > unique: 3201, opcode: RELEASE (18), nodeid: 2, insize: 64 > Operation from thread 3037969328 > unique: 3202, opcode: GETATTR (3), nodeid: 1, insize: 40 > Operation from thread 3085450160 > unique: 3202, error: 0 (Success), outsize: 112 > unique: 3201, error: 0 (Success), outsize: 16 > (hang) > > As you can see the response for 3202 arrives before the response for 3201. > This appears to make Fuse very unhappy. > > The command I am using to drive this is cp. Here are the pertinent parts > from the trace: > > open("medium", O_RDONLY|O_LARGEFILE) = 3 > fstat64(3, {st_mode=S_IFREG|0644, st_size=102400, ...}) = 0 > open("/mnt/proxyfs/medium", O_WRONLY|O_TRUNC|O_LARGEFILE) = 4 > fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 > fstat64(3, {st_mode=S_IFREG|0644, st_size=102400, ...}) = 0 > read(3, "I`5~\324\250\35\322 COw\23T\336\204iW\23\243\252>\f\256"..., 4096) > = 4096 > write(4, "I`5~\324\250\35\322 COw\23T\336\204iW\23\243\252>\f\256"..., > 4096) = 4096 > . > . > . > write(4, "~#@\270\350\262lk\304\366|\315j\235\242\263\20\353?\314"..., > 4096) = 4096 > read(3, "", 4096) = 0 > close(4) = 0 > close(3) = 0 > write(1, "`medium\' -> `/mnt/proxyfs/medium"..., 34`medium' -> > `/mnt/proxyfs/medium' > ) = 34 > close(1) = 0 > munmap(0xb7f8c000, 4096) = 0 > exit_group(0) = ? > > > This looks normal enough. Now here's the pertinent part from trace for the > next cp command: > > lstat64("/mnt/proxyfs/", 0xbf84e620) = -1 EIO (Input/output error) > > I'd like to point out that putting a wait between invocations of cp cures > to problem. It's interesting that Fuse gets the getattr call from the second > cp before it gets the response from release for the first cp. > > Does anyone have any idea what is going on here and what I might be doing > wrong? > > > TIA > -Robert > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > fuse-devel mailing list > fus...@li... > https://lists.sourceforge.net/lists/listinfo/fuse-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ fuse-devel mailing list fus...@li... https://lists.sourceforge.net/lists/listinfo/fuse-devel -- Amar Tumballi Gluster/GlusterFS Hacker [bulde on #gluster/irc.gnu.org] http://www.zresearch.com - Commoditizing Super Storage! |