Bug 4194 - Can't read directories with many files+directories
Can't read directories with many files+directories
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools
x86 Linux
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2006-10-29 07:09 UTC by Walkie
Modified: 2007-04-28 04:05 UTC (History)
1 user (show)

See Also:

trace of an ls /mount/baddirectory operation (27.96 KB, text/plain)
2007-01-15 11:19 UTC, Timothee Besset
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walkie 2006-10-29 07:09:19 UTC
ls returns
ls: reading directory .: Invalid argument
on cifs mounted volume on directories with many files+directories (tested 105 number is ok, more gets error)
and orter methods to stat that directory also non-funcctionsl
server uses FC5 samba3.0.21b-2 client is FC6 samba 3.0.23c-2
when client was FC5 samba 3.0.23c-2 everything works fine
Comment 1 Timothee Besset 2007-01-15 10:52:30 UTC
I am experiencing something very similar, with directories that have respectively  159, 124 and 175 files in them. Likely all the directories in the tree that have a  higher file count.

The client is running up to date FC5 (kernel version: 2.6.18-1.2200.fc5), I have no idea what the server is (a Windows box probably). man mount.cifs says cifs version 1.39

Going to see about upgrading to latest.

Comment 2 Timothee Besset 2007-01-15 11:00:07 UTC
I mistakenly reported version 1.39, looks like it's 1.45:

# modinfo cifs
filename:       /lib/modules/2.6.18-1.2200.fc5/kernel/fs/cifs/cifs.ko
author:         Steve French <sfrench@us.ibm.com>
license:        GPL
description:    VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
version:        1.45
vermagic:       2.6.18-1.2200.fc5 mod_unload 686 REGPARM 4KSTACKS gcc-4.1
srcversion:     535782E74FBE6506A31138A
parm:           cifs_max_pending:Simultaneous requests to server. Default: 50 Range: 2 to 256 (int)
parm:           cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (int)
parm:           cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (int)
parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (int)
Comment 3 Timothee Besset 2007-01-15 11:19:54 UTC
Created attachment 2257 [details]
trace of an ls /mount/baddirectory operation

A trace of an ls performed on one of those bad directories. It loops through the files, the only thing I can notice is this at the end:

 fs/cifs/readdir.c: filldir rc = -22
 fs/cifs/readdir.c: new entry ea1f51ac old entry ea1f514c
 fs/cifs/readdir.c: CIFS VFS: leaving cifs_readdir (xid = 16530490) rc = -22
Comment 4 Timothee Besset 2007-01-15 11:28:30 UTC
ok, found stuff by looking in the mailing list archives
Comment 5 Spammer 2007-04-28 04:05:57 UTC
Created attachment 2496