Bug 2640 - inconsistent behavior when doing recursive ls in smbfs
inconsistent behavior when doing recursive ls in smbfs
Status: RESOLVED WONTFIX
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools
3.0.10
All All
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-22 16:40 UTC by Kevin
Modified: 2005-04-25 01:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin 2005-04-22 16:40:22 UTC
I mounted a WinXPH shared directory as an smbfs in Linux x86 kernel
2.6.11-gentoo-r3 and did a:

# ls -alR /mnt/smbfs |wc
several times and got the following results:

aphrodite iTunesMusic # ls -alR|wc
  15043  149134  856136
aphrodite iTunesMusic # ls -alR|wc
  15043  149134  856136
aphrodite iTunesMusic # ls -alR|wc
  15043  149134  856136
aphrodite iTunesMusic # ls -alR|wc
  14935  148076  849759
aphrodite iTunesMusic # ls -alR|wc
  15269  151731  870910
aphrodite iTunesMusic # ls -alR|wc
  14935  148076  849759
aphrodite iTunesMusic # ls -alR|wc
  15291  151645  870870
aphrodite iTunesMusic # ls -alR|wc
  15269  151731  870910
aphrodite iTunesMusic # ls -alR|wc
  15043  149134  856136
aphrodite iTunesMusic # ls -alR|wc
  14935  148076  849759


I did the same thing in Mac OSX 10.3.9 (smbclient --version says it's version
3.0.10) and got similar results:

hermes:/Volumes/music/iTunesMusic$ ls -alR|wc
   15458  153680  947758
hermes:/Volumes/music/iTunesMusic$ ls -alR|wc
   15458  153680  947758
hermes:/Volumes/music/iTunesMusic$ ls -alR|wc
   15328  152302  939301
hermes:/Volumes/music/iTunesMusic$ ls -alR|wc
   15458  153680  947758
hermes:/Volumes/music/iTunesMusic$ ls -alR|wc
   15458  153680  947758
hermes:/Volumes/music/iTunesMusic$ ls -alR|wc
   15458  153680  947758
hermes:/Volumes/music/iTunesMusic$ ls -alR|wc
   15457  153666  947676
hermes:/Volumes/music/iTunesMusic$ smbclient --version
Version 3.0.10


I've only seen this behavior in x86 Linux and OSX 10.3.9 but if it's present in
both of these I figured it was likely to be present in all OS's and platforms so
that's why I chose those settings.

The directory tree in question has some unusual characters (non-ascii?) in it
and that may have something to do with why this is happening.  I may not have
all of the charset encodings available in Linux that I should, but I don't think
I have much to do with the OSX 10.3.9 kernel code.

There was something else I noticed in doing this (copying a bunch of song files
from a windows box to a linux box---the files were written by iTunes in OSX to
an HFS+ filesystem, then moved to the windows box (NTFS), and now finally to an
afs volume in Linux).  There is a group of singers called Aine Minogue (I think
the A should really have an accent egu or accent grave on it), and that is how
iTunes created the directory (with the accent), and that is how it got stored in
the ntfs filesystem on the windows box (with the accent), but when I did an ls
in linux in the smbfs, what I got was the directory name _without_ the accent
(literally, "Aine Minogue").  ls saw the directory (incorrectly, without the
accent), but saw none of the contents of the directory.  When I went to the
windows box and renamed the directory, replacing the accented A with a regular
A, and then went back to ls in the smbfs in linux, this time ls saw the
directory and contents correctly.

If I can provide more details I'd be glad to, but I'm not quite sure how to go
about discovering what charset the files and directories were stored in on the
ntfs.  If someone can explain that to me, I'd be glad to provide those details
as well.  Any other details?

Thank you folks for making Samba.  Truly a wonderful suite of software!
Comment 1 Kevin 2005-04-22 16:43:17 UTC
Oh, forgot to add that when I did the ls -alR | less, I actually saw duplicate
entries for directories in some cases and completely missed entries in other
cases.  This varied from time to time.  That's why I finally tried the |wc
experiment.
Comment 2 Lars Müller 2005-04-25 01:47:20 UTC
The smbfs stuff isn't longer supported.  Please use the cifs Linux kernel module
instead and reopen if you have the same problem with it.