stat broken for CIFS filesystem
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| linux (Ubuntu) |
Medium
|
Jim Lieb |
Bug Description
The reporter has the problem with a CIFS mount that [ -f file ] returns 0 even if the file does NOT exist. The attached starce shows:
stat64(
This is clearly boken, since a subsequent open on the file fails...
-----
Original description follows:
Binary package hint: bash-completion
When pressing tab key after "make ", in directory where is file Makefile, message "grep: ./makefile: No such file or directory" is shown.
It's like bash do case insensitive compare in file /etc/bash_
# make reads `GNUmakefile', then `makefile', then `Makefile'
if [ -f ${makef_
fi
After update from 7.10 to 8.04 LTS. In version 7.10 is completion ok.
Mika Fischer (zoop) wrote : | #1 |
Michael Heča (orgoj) wrote : | #2 |
heca@pc-
0
heca@pc-
0
heca@pc-
celkem 2048
-rwxrw-r-- 1 contimex contimex 108 2006-08-02 14:55 index.html
drwxrwsr-x 9 contimex contimex 0 2008-01-31 15:50 lib
drwxrws--- 14 contimex contimex 0 2008-04-21 15:12 link
-rwxrw-r-- 1 contimex contimex 1386 2008-03-27 14:57 Makefile
drwxrwsr-x 6 contimex contimex 0 2008-04-22 16:56 .svn
drwxrwsr-x 8 contimex contimex 0 2008-03-28 18:55 tmp
drwxrwxr-x 4 contimex contimex 0 2008-03-28 18:55 tools
drwxrwxr-x 4 contimex contimex 0 2008-04-18 14:53 .unison
drwxrwsr-x 37 contimex contimex 0 2008-04-21 15:12 webs
It's mouted dir from Samba by CIFS.
Mika Fischer (zoop) wrote : | #3 |
Well then this is the problem. It should print 1 if the file does not exist.
Can you do the following:
strace -o cifs-strace.txt bash -c '[ -f ./makefile ]'
And attach the resulting cifs-strace.txt to this bug? Maybe this tells us what's the problem. I suspect it's a bug in the CIFS filesystem driver.
Michael Heča (orgoj) wrote : | #4 |
Michael Heča (orgoj) wrote : | #5 |
I try completion on local filesystem and it's ok.
Mika Fischer (zoop) wrote : | #6 |
orgoj, please attach the following things (see: https:/
- uname -a > uname-a.log
- cat /proc/version_
- dmesg > dmesg.log
- sudo lspci -vvnn > lspci-vvnn.log
And additionally please post the command you use to mount the remote filesystem, or the line in /etc/fstab if there is one.
I'll reassign this to the kernel team then.
description: | updated |
Changed in bash-completion: | |
assignee: | nobody → ubuntu-kernel-team |
Michael Heča (orgoj) wrote : | #7 |
Michael Heča (orgoj) wrote : | #8 |
Michael Heča (orgoj) wrote : | #9 |
Michael Heča (orgoj) wrote : | #10 |
Michael Heča (orgoj) wrote : | #11 |
Leann Ogasawara (leannogasawara) wrote : | #12 |
The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:
1) If you are comfortable installing packages on your own, the linux-image-
--or--
2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://
Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.
Konstantin Baev (kipruss) wrote : | #13 |
This painful problem, unfortunately, has not yet been solved. What are the prospects for its decision?
Example: (file "test" exist, file "tEsT" does not exist)
1. in local filesystem (correct behavior - case sensitive):
kipruss@kubuntu:~$ ls test
test
kipruss@kubuntu:~$ ls tEsT
ls: невозможно получить доступ к tEsT: No such file or directory
kipruss@kubuntu:~$ [ -f test ] || echo "not found"
kipruss@kubuntu:~$ [ -f tEsT ] || echo "not found"
not found
2. in directory, mounted by cifs (bug):
kipruss@
test
kipruss@
tEsT
kipruss@
kipruss@
kipruss@
testtesttest
kipruss@
cat: tEsT: No such file or directory
Changed in linux: | |
status: | New → Confirmed |
Konstantin Baev (kipruss) wrote : | #14 |
My workaround (Kubuntu 8.10, kernel 2.6.27-9-generic):
I added to the begin of file "/usr/src/
#ifndef CONFIG_CIFS_XATTR
#define CONFIG_CIFS_XATTR
#endif
#ifndef CONFIG_CIFS_POSIX
#define CONFIG_CIFS_POSIX
#endif
and recompiled driver "cifs.ko" separately, not recompiling kernel
so:
kipruss@kubuntu:~$ ls test
test
kipruss@kubuntu:~$ ls tEsT
ls: невозможно получить доступ к tEsT: No such file or directory
----
General solution:
In default kernel .config (CIFS part) we can found:
CONFIG_CIFS=m
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_
CONFIG_
# CONFIG_CIFS_STATS is not set
CONFIG_
CONFIG_
# CONFIG_CIFS_XATTR is not set
The problem will be solved if they change CIFS part of kernel .config file to
CONFIG_CIFS=m
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_
CONFIG_
# CONFIG_CIFS_STATS is not set
CONFIG_
CONFIG_
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
If this is not a bug, it is very strange feature of Ubuntu kernel config
P.S. In Ubuntu 8.04 - all the same
Changed in linux: | |
importance: | Undecided → Medium |
status: | Confirmed → Triaged |
Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https:/
Andy Whitcroft (apw) wrote : | #16 |
Having reviewed the two config options proposed for enabling it is not at all clear how either could possibly fix this problem, one enabling extended attributes and the other posix protection extensions. That in itself implies a bug elsewhere is being masked to my mind.
Konstantin Baev (kipruss) wrote : | #17 |
Have you tried to rebuild the module cifs with these additions in cifspdu.h or rebuild the kernel or you think about this problem only in theory?
Jim Lieb (lieb) wrote : | #18 |
The POSIX setting controls the wire protocol. Posix protocol makes filenames
case sensitive on the server side since that is where the name resolution takes place. The protocol setting is in fs/cifs/
protocol defs are enumerated.
The question here is what the default for CIFS should be because there are
compatibility implications for both. The default config from kernel.org is
to set POSIX and ATTR. What would break in Windows<->Linux interoperability if filenames became the UNIX/Linux default rather than the
Windows default?
My recommendation is to set them both because this is a client side setting.
Changed in linux: | |
assignee: | nobody → lieb |
status: | Triaged → In Progress |
Tim Gardner (timg-tpi) wrote : | #19 |
Configs enabled for Jaunty. Intrepid is still under discussion.
Changed in linux: | |
status: | In Progress → Fix Committed |
Launchpad Janitor (janitor) wrote : | #20 |
This bug was fixed in the package linux - 2.6.28-4.10
---------------
linux (2.6.28-4.10) jaunty; urgency=low
[ Andy Whitcroft ]
* update kernel bootloader recommends: to prefer grub
- LP: #314004
* SAUCE: don't use buggy _BCL/_BCM/_BQC for backlight control
- LP: #311716
* SAUCE: test-suspend -- add the suspend test scripts
- LP: #316419
[ Colin Watson ]
* Enable udebs for armel
[ Tim Gardner ]
* SAUCE: Dell laptop digital mic does not work, PCI 1028:0271
- LP: #309508
* Enable CIFS_XATTR=y and CONFIG_CIFS_POSIX=y
- LP: #220658
-- Tim Gardner <email address hidden> Thu, 08 Jan 2009 10:38:22 -0700
Changed in linux: | |
status: | Fix Committed → Fix Released |
I cannot reproduce this on hardy...
What does the following print in the directory in question?
[ -f ./makefile ]; echo $?