This may be related to some other timestamp issues I've seen in other bug reports but I figured it couldn't hurt to offer up my problem.
I recently had to make the move from SMBFS to CIFS when I upgraded from
Fedora 4 to 5. Changing settings in my /etc/fstab was easy and no
errors come up but now I'm having an issue very similar to post I found
on your list that got no response back in April:
Just as he describes in his second point, while editing a file from a
CIFS mounted share, something is confusing vim as to the timestamp of
the file and it thinks that the file has changed since my last writing.
My first write always works without a warning but all subsequent writes
produce the warning. I can guarantee that I am in fact the only person
editing this file
This occurs regardless of what OS owns the share. I'm experiencing the
same situation on mounted shares from a Windows 2003 server as well
another Linux server running Fedora 5 as well. This leads me to believe
it's more a client-side issue than improperly configured shares. To a
further point, I attempted to alter the date/time on the Windows 2003
server to both before and after the date/time on my client machine w/ no
change in situation. I've encountered some Vim
discussions/documentation alluding to an issue on Windows relating to
daylight savings but, again, since this appears to be happening
regardless of server OS, I've again weeded that out as a cause.
This issue never occurred while using SMBFS so I can only attribute it
to the new, forced, use of CIFS. Likewise, I'm hesitant to blame vim as
I'm not having this problem on local files or files mounted through NFS
or other means. Here's a run-down of my specs if it helps:
OS: Fedora Core 5 Linux
Kernel version: 2.6.17 (from 2.6.17-1.2174_FC5 RPM)
Samba version: 3.0.23b (from samba.org provided RPMs)
//SERVER/SHARE /PATHTO/MOUNTPOINT cifs
auto,setuids,user=XXX,password=XXX,gid=celston,uid=celston,dir_mode=0775,file_mode=0664 0 0
I suggest running "wireshark", "tshark", "dumpcap", or "tcpdump" on your client and capturing a network trace while running VIM. You can then attach the network capture file here.
It might also be useful to run an "strace -o <file> vim", with VIM accessing a local file, a file on an NFS mount, and a file on a CIFS mount.
Created attachment 2122 [details]
strace output while vim'ing a local file
Created attachment 2123 [details]
strace output while vim'ing a nfs mounted file
Created attachment 2124 [details]
strace output while vim'ing a cifs mounted file
Created attachment 2125 [details]
wireshark trace while vim'ing a cifs mounted file
I filtered by the "smb" protocol
I've uploaded 4 files. The first 3 are output of strace while editing the same file in 3 different scenarios: local, NFS mounted and CIFS mounted. I also attached a filtered set of output from wireshark while vim'ing the cifs mounted file. In each case I opened the file, wrote it (despite no changes), added a line, wrote again (in the case of the CIFS scenario, said "yes" to the prompt) and then quit vim.
This was my first time using wireshark so if you'd like me to try again w/ a specific set of instructions I can do that.
When I cifs mount OS/2 shares, all timestamps on all files and dirs are last epoch.
I have recently updated one of the Linux servers I often CIFS mount. That server is running Fedora Core 4 and I installed Samba 3.0.23c from the source RPM provided at samba.org. This seems to the fix problem I experience in vim. The problem still exists on shares CIFS mounted from Windows 2003 servers.
This begs the questions: 1) What changed between 3.0.23a and 3.0.23c server-wise that fixed this? 2) What can I possibly do to my Windows served shares or the server itself to remedy my remaining problems?
I'm seeing similar problems using Fedora Eclipse over a cifs mount. I repeatedly get "update conflict" and "file changed" error messages in the course of just editing and opening files on the mount. It seems to be a repeat of this issue:
As originally reported in this Eclipse bug report:
I experience a similar issue when attempting to "tail -f <file>" on a cifs mount. tail does not receive any notification of file updates. I did notice, tail will update if you "ls -l" in the directory/mount where the file is contained, thus forcing a timestamp update.
This is on Fedora Core 6 using 2.6.18 and 3.0.23c
Should be working now on current kernels and in cifs-backport-for-old kernels tree (in both kernel.org and in Samba svn).
cifs version 1.48
I still have the same problem with Ubuntu 6.10 Edgy, kernel 2.6.17 and 2.6.20. I
tried applying cifs 1.48 to my 2.6.17 kernel as described, but it would not compile. I upgraded to kernel 2.6.20 which i believe includes cifs 1.48, but I continue to have the same issue which I've described here (https://bugzilla.samba.org/show_bug.cgi?id=3775)
I was able to confirm that this is resolved using a 220.127.116.11 kernel source and CIFS source from SVN. I also had compile issues but was able to get around them. I had to remove "export.o" from the Makefile and I got many warnings in the process. Where best should I report my findings?
Yeah I had the same problem with 2.6.20-15, latest ubuntu right now. The cifs version with `modinfo cifs` is 1.47. I was able to fix this by compiling an external module cifs 1.48a that I got from http://us1.samba.org/samba/ftp/cifs-cvs/.