Bug 7676 - Files duplicated in directory listing
Summary: Files duplicated in directory listing
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Steve French
QA Contact:
Depends on:
Reported: 2010-09-13 08:31 UTC by Jerome Warnier
Modified: 2010-12-22 10:55 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Warnier 2010-09-13 08:31:46 UTC
Server: Nexenta Core Platform 3.0 (~OpenSolaris b134).
Client: Debian Lenny (5.0.6) GNU/Linux running kernel 2.6.26-2-686 (2.6.26-25) with cifs.ko version 1.53.

The mount options used are (I stripped authentication info): rw,username=userX,password=passwordX,uid=userX,gid=groupY,dir_mode=0775,file_mode=0774

The problem I notice is that on the client, files appear multiple times in directory as soon as they are more than 127 actual files in the directory (and it is reproducible at will). At 127 files, each one is shown 2x (twice), up to 128x in directories with more that a few thousands files.
Their inodes are identical (as shows "ls -li"). Listing the directory gets slower and slower with the number of files (and duplicates) in it.
On the server, everything is fine though.
Shell globbing is getting the duplicates.

I tried with kernel 2.6.32 (which has a newer cifs.ko) from backports.debian.org, and the problem is not present (fixed?).

I'm going to report the current bug to Debian's BTS too (linux-image-2.6.26).

In the past, it was possible to download the sources for latest cifs.ko separately, and apply it to an older kernel, but it no longer seems possible (or I did not found latest sources).
Comment 1 Jeff Layton 2010-12-22 10:55:16 UTC
I'm pretty sure this was fixed in some of the readdir fixes that have gone in since 2.6.26. I'm going to go ahead and close this as FIXED.