Could you also attach some debug output from each of the operations, showing what FUSE operations are invoked for each command?
(Mount the filesystem with the 'debug' option, i.e. '-odebug'.)

- Erik

mar wrote 2010-03-06 01.24:
I've been working on the implementation of a new filesystem based on
MacFUSE. As part of this development I have found a problem when
moving directories in MacFUSE filesystems. I have replicated the
problem using the sshfs filesystem found in the svn and fusexmp
filesystem that can be found on the web.

The problem is shown in the following sequence of commands.

$ mkdir testdir2
$ cd testdir2
$ mkdir testdir1
$ cd testdir1
$ mkdir testdir0
$ cd ..
$ ls
testdir1
$ cd ..
$ ls
testdir2
$ cd testdir2
$ mv testdir1 ..
$ ls
$ cd ..
$ ls
testdir1 testdir2
$ cd testdir1
$ ls
testdir0<=== testdir0 in testdir1
$ mv testdir0 ..<=== move testdir0 to parent directory
$ ls
$ cd ..
$ ls
testdir1 testdir2<=== testdir0 should be moved here but it isn't
$ cd testdir2
$ ls
testdir0<=== testdir0 in testdir2 !!! Problem.


The following script will reproduce the problem:

!/bin/sh

# Run script with an empty directory as the first argument

[ -z "$1" ]&&  { echo "Syntax: $0<empty directory>"; exit 1; }
[ $(ls "$1/" | wc -l | awk {'print $1'}) != 0 ]&&  { echo "Error:
directory not empty"; exit 1; }

pushd "$1"&>  /dev/null
while true
do
         mkdir testdir2
         cd testdir2
         mkdir testdir1
         cd testdir1
         mkdir testdir0
         cd ..
         cd ..
         cd testdir2
         mv testdir1 ..
         cd ..
         cd testdir1
         mv testdir0 ..
         cd ..
         [ -d testdir0 -a -d testdir1 -a -d testdir2 ] || {
                 echo "Defect reproduced"
                 break
         }
         rmdir testdir0 testdir1 testdir2
done
popd>&  /dev/null


This looks like it may be a problem with how MacFUSE is updating the
parent directory when moving the folders. Does anyone have a
suggestion on how to fix this?

Regards,
Michael Richmond


--
You received this message because you are subscribed to the Google Groups 
"MacFUSE" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/macfuse?hl=en.

Reply via email to