Bug 762793 (GLUSTER-1061)

Summary: bug in dht_readdir_cbk
Product: [Community] GlusterFS Reporter: Krishna Srinivas <krishna>
Component: distributeAssignee: Anand Avati <aavati>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: urgent    
Version: mainlineCC: chrisw, gluster-bugs, vijay
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Krishna Srinivas 2010-07-13 01:08:58 UTC
dht_readdir_cbk:

                subvol = dht_layout_search (this, layout, orig_entry->d_name);

                if (!subvol || (subvol != prev->this)) {
                        entry = gf_dirent_for_name (orig_entry->d_name);
                        if (!entry) {
                                gf_log (this->name, GF_LOG_ERROR,
                                        "Out of memory");
                                goto unwind;
                        }

this is the old way of doing readdir which filters out the file if it does not belong to the hashed subvol. It should behave the way dht_readdirp_cbk does. This is a critical bug because of which distribute subvols can not be expanded because mount point will see not see all the files after defrag script is run after expansion. Faced this problem after upgrading to glusterfs-3.0.5 at a customer setup. This problem is showing now because fuse's readdir fop was changed from "readdirp" to "readdir" to speed up readdir.

Comment 1 Vijay Bellur 2010-07-14 03:08:41 UTC
Krishna, the code excerpt that you have pasted doesn't seem relevant. Can you please check from the latest release-3.0 code?

Comment 2 Krishna Srinivas 2010-07-16 02:16:18 UTC
(In reply to comment #1)
> Krishna, the code excerpt that you have pasted doesn't seem relevant. Can you
> please check from the latest release-3.0 code?

Vijay, just checked the latest code, the code pasted seems relevant and the bug seemed valid, can you recheck?