Scenario: A (shared) directory with many (1600+) files. Filenames encoded server-side in ISO-8859-15 with special characters. Server smb.conf specifies UTF-8 encoding (which is a mistake but read on).
Bug: When doing an 'ls' on client side (using cifs from a vanilla 188.8.131.52 linux kernel), hundreds of files are simply omitted in the list (it seems the list gets truncated at an arbitrary but constant position). Opening unlisted files by name works, as does 'ls' when mounting the share using smbfs. Wireshark dumps are available on request.
Comment: I think this is a severe bug. Of course misconfiguring encoding is a mistake - however, silently dropping directory entries is definitively the wrong behaviour then as it's difficult to notice and can wreak havoc if, for example, rsync backups are done via SMB (rsync will happily delete the omitted files as it doesn't see any errors). cifs should list files with placeholders as offending characters instead which may be impossible to open but at least the problem is obvious then.
Keywords: cifs smbfs wrong encoding missing files directory list
If it shows correctly with smbfs or Windows this is a CIFSFS bug, not a Samba one. I'm changing the product to CIFSFS for Steve to comment.
There were some bugs fixed in the readdir codepath within the last year. Is this problem still reproducible with more recent kernels (maybe 2.6.30 or so)?
No response in several months, closing bug as WORKSFORME.
Please reopen if this is still an issue.