[linux-cifs-client] Incorrect FIND_NEXT2 transmission causing truncation of directory listings

Richard Hughes ee21rh at eim.surrey.ac.uk
Sun May 2 12:49:03 GMT 2004


I have a directory on a samba server sharing lots of small files, say
dir000.txt to dir999.txt

samba version (server): 3.0.3-2.pre2
cifs version (client) : 1.12
kernel version (client) : 2.6.6rc3 + CIFS-cvs

The share mounts correctly, and correctly displays small directory
outputs, but when a large number of files are present, it displays:
dir000.txt to dir122.txt and nothing more.

I used ethereal to trace the network activity, and found the following..

[client types ls]
client->server QUERY_PATH_INFO, Query File Unix Basic, Path : 
server->server QUERY_PATH_INFO
client->server FIND_FIRST2, Pattern: \*
server->server FIND_FIRST2, Files:[....]
client->server FIND_NEXT2, Continue: dir060.txt
server->server FIND_NEXT2, Files:[....]
client->server FIND_NEXT2, Continue: [\001]
server->server FIND_NEXT2

then the connection closes.

The second request for FIND_NEXT2 just sends 0x001, rather than the file
dir122.txt - this must be a bug in the cifs code somewhere (cifssmb.c
??) . Anybody got any ideas?

Google brought up some details about truncated directory listings for
the 2.4 kernel, but that was some time ago.

 Richard Hughes





More information about the linux-cifs-client mailing list