[linux-cifs-client] CIFS mount breaks when LinuxExtensionsEnabled == 0

Adam Nielsen adam.nielsen at uq.edu.au
Fri Aug 15 04:26:17 GMT 2008


> I think that message must be unrelated though, because I mounted the 
> filesystems a few dozen times and only got that one message.

The message is definitely unrelated, I reproduced the problem just now 
and nothing at all appeared in dmesg.

I did notice some rather unusual behaviour though - when I mount with 
Linux extensions disabled, as previously mentioned no files appear in 
the share.  If I then create a file (e.g. with "touch") it then appears 
as the only file in the share, with a backslash prepended to the name:

# echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
# mount web ; cd web
# ls
total 0

# touch a
# ls
total 0
drwxrwx--- 4 root web  0 2008-08-04 14:03 .
drwxr-xr-x 5 root web 49 2008-07-28 09:52 ..
-rw-rw---- 1 root web  0 2008-08-15 14:07 \a

# cat a
# cat \\a
cat: \a: Invalid argument


Strangely enough, if I remount with Linux extensions enabled again, I 
can see the oddly named files:

# echo 1 > /proc/fs/cifs/LinuxExtensionsEnabled
# mount web ; cd web
# ls
total 12K
drwx--x--x  5 root web    0 2008-08-15 14:09 .
drwxr-xr-x  5 root web   49 2008-07-28 09:52 ..
-rw-r--r--  1 root web    0 2008-08-15 14:07 \a
-rw-------  1 root web 5.7K 2005-07-16 08:35 .bash_history
-rwx------  1 root web  219 2005-04-26 10:28 .bashrc
-rw-------  1 root web  167 2003-07-26 08:37 .forward
-rw-------  1 root web  486 2005-01-18 15:49 .history
...

Stranger still, if I create some files starting with a backslash, 
they're the only ones that appear when remounting with Linux extensions 
disabled again:

# touch \\test
# ls
total 12K
drwx--x--x  5 root web    0 2008-08-15 14:09 .
drwxr-xr-x  5 root web   49 2008-07-28 09:52 ..
-rw-r--r--  1 root web    0 2008-08-15 14:07 \a
-rw-------  1 root web 5.7K 2005-07-16 08:35 .bash_history
-rwx------  1 root web  219 2005-04-26 10:28 .bashrc
-rw-------  1 root web  167 2003-07-26 08:37 .forward
-rw-------  1 root web  486 2005-01-18 15:49 .history
...
-rwxr--r--  1 root web    0 2008-08-15 14:09 \test

# cd .. ; umount web
# echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
# mount web ; ls web
total 0
drwxrwx--- 4 root web  0 2008-08-15 14:09 .
drwxr-xr-x 5 root web 49 2008-07-28 09:52 ..
-rw-rw---- 1 root web  0 2008-08-15 14:07 \a
-rw-rw---- 1 root web  0 2008-08-15 14:09 \test

This seems really bizarre!  Why would a leading backslash be required 
before the filenames appear?  Why would the backslash be added to all 
file requests? (e.g. the "cat" command right at the top of my post.)

Thanks,
Adam.


More information about the linux-cifs-client mailing list