After upgrading to 2.6.18 (fedora core 5) our clients have problems with cifs mounts. As we use cifs-mounted home direcotries this a major problem. The directories mount fine. We can cd to directories, and list directories with only a few files. Directories with more than a very few files just give this error: nfybw@arpaksad:~$ ls ls: reading directory .: Invalid argument The relevant part of strace seems to be open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3 fstat64(3, {st_mode=S_IFDIR|0711, st_size=0, ...}) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 getdents64(3, 0x988117c, 4096) = -1 EINVAL (Invalid argument) The server is samba (I think 3.0.22).
Is this FC5? Fedora added a patch to their 2.6.18 which changes the default i/o size for inodes (from 16K which cifs sets it to - to a much smaller 4K, page size) which causes readdir to run out of space. See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=211070
Fix is attached to comment 13 of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=211070 For FC5 cifs may eventually change the cifs_getattr (stat) code to overwrite the smaller i/o size that is now written into inodes (with cifs's recommended size of 16K)