[linux-cifs-client] cifs 1.20c - Unshare while in use causes VFS
enter an inconsistent state
Alexander Indenbaum
alexander.indenbaum at gmail.com
Mon Dec 8 15:35:53 GMT 2008
Hello,
We're working with embedded Linux boxes powered by 2.4 kernel and cifs
1.20c connected to WinXP CIFS.
We perform following test:
1. Mount share as /mnt/cifs
2. Open file on the share
3. On WinXP server unshare the CIFS share
The issue here is that when we stop sharing file system on WinXP
server, while a file on it is being used on Linux client it causes to
following behavior:
- Mount point /mnt/cifs disappear from file system.
- File system stays mounted from kernel point of view: /proc/mounts
At this stage kernel VFS is in inconsistent state. It's impossible to
re-create mount point, because it's partially there and partially not:
o # pwd
o /mnt
o # ls –la
o ls: ./cifs: No such device or address
o drwxrwxrwx 1 root root 0 Jan 1 00:00 .
o drwxr-xr-x 1 root root 0 Jan 1 00:00 ..
o # mkdir /mnt/cifs
o mkdir: Cannot create directory `/mnt/cifs': File exists
o # mkdir -p /mnt/cifs
o mkdir: Cannot create directory `/mnt/cifs': No such device or address
The result is unmountable file system. The only cure is reboot.
o # cat /proc/mounts | grep cifs
o //10.0.0.163/shared /mnt/cifs cifs
rw,mand,nodiratime,unc=\\10.0.0.163\shared,domain=,rsize=4100,wsize=4100
0 0
o # umount /mnt/cifs
o umount: /mnt/cifs: No such file or directory
This bug is not present in modern 2.6 kernels. I'm looking for a way
to back port the fix to 2.4 cifs 1.20c. Any source level pointer to or
advice are welcome.
Thank you,
Alexander Indenbaum
More information about the linux-cifs-client
mailing list