I have a very similar problem to bug 1251, but I'm not sure if it is similar enough and I can't add a comment for it because "Only submitter can change Hardware field to All". I have Linux kernel version 2.4.27 with SAMBA 3.0.4 mounting a share from win2k server. This share has one subdirectory that is not always listed correctly. Problem was also happening with 2.4.26 and perhaps with earlier kernels. Following log message (always the same) appears when read fails: smb_proc_readdir_long: name=, result=-2, rcls=1, err=123 If some files are moved from directory, directory listing stars to work. There just isn't any logic behind it... Copying some files to subdirectories, removing them from main directory, moving them back and removing the created subdirectory can make the directory listing work again. There is no single file that causes problems. This happens only with one subdirectory of one share. Everything else works correctly. Filenames are listed correctly (I haven't checked the file count yet) when another directory reads are made within one second after initial read. First one returns 0 entries, others return lots of files. When sniffing network traffic, it can be seen that first one is the only one that actually fetches data from the server. Later directory listings come from kernel cache. When listing the same directory with smbclient, everything works correctly all the time. Problematic directory has nearly 1730 files in it.
You appear to be using smbfs. We don't maintain that kernel code. You'll either need to get int touch with the smbfs maintainers or possibly try the linux cifs fs (http://linux-cifs.samba.org/)