Hide Forgot
My mistake - This is a posix entrylk problem, while testing the new code changes - removing READLK and wasn't very apparent. Marking it invalid.
If a regular file 'x' exists and it is removed and a directory of the same name 'x' is tried to create, it fails, saying File exists. The back-end however does not have the file. I encountered this in a simple AFR config. pavan@dapawz:~/mounts/mnt1/locks$ touch test pavan@dapawz:~/mounts/mnt1/locks$ ls a b file locktests locktests.c locktests.c~ Makefile test pavan@dapawz:~/mounts/mnt1/locks$ rm test pavan@dapawz:~/mounts/mnt1/locks$ ls a b file locktests locktests.c locktests.c~ Makefile pavan@dapawz:~/mounts/mnt1/locks$ mkdir test mkdir: cannot create directory `test': File exists I've moved the log files and spec files to /share/tickets/<bug id> since the file sizes were huge.
Infact - the bug does exist. Every mkdir fails and it says that the file exists. If a long name is given for the directory name, it succeeds, but the directory created has a truncated name. I noticed this on a simple AFR config. However, the backend directories are consistent, and have the same exact truncated directory if the mkdir succeeds.
[root@management mnt1]# mkdir ggggggg mkdir: cannot create directory `ggggggg': File exists [root@management mnt1]# mkdir ggggggggggg [root@management mnt1]# ls abc ggg [root@management mnt1]# mkdir a mkdir: cannot create directory `a': File exists [root@management mnt1]# mkdir b mkdir: cannot create directory `b': File exists [root@management mnt1]# ls abc ggg
Volfiles and log files in /share/tickets/226/ ..<snip> 009-08-25 14:48:14] E [posix.c:814:posix_mkdir] posix: mkdir of / failed: File exists [2009-08-25 14:48:14] T [server-protocol.c:772:server_mkdir_cbk] server: 172: MKDIR / ==> -1 (File exists) [2009-08-25 14:48:14] T [server-protocol.c:4565:server_xattrop_resume] brick: 55: XATTROP '/ (1)'
Verified that mkdir always fails even in a simple FUSE->posix setup. $ mkdir blah mkdir: cannot create directory 'blah': File exists $ mkdir 1234567890 $ ls 90 The first eight characters appear to get truncated, and thus for short names an mkdir is attempted on "/", which fails with EEXIST.
PATCH: http://patches.gluster.com/patch/1161 in master (fuse: protocol fix: fix bogus parsing of MKDIR message)