Bug 1435942

Summary: Enabling parallel-readdir causes dht linkto files to be visible on the mount,
Product: [Community] GlusterFS Reporter: Poornima G <pgurusid>
Component: unclassifiedAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.10CC: bugs, ravishankar, redhatbugzilla, rtalur
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.10.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1431908 Environment:
Last Closed: 2017-05-31 20:47:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1431908, 1460898    
Bug Blocks: 1437960, 1438468, 1442603    

Description Poornima G 2017-03-26 02:22:54 UTC
+++ This bug was initially created as a clone of Bug #1431908 +++

Description of problem:
When parallel readdir is enabled, readdir-ahead is loaded below DHT and does a readdir and fetches entries without any associated dict with it and caches it. Consequently readdirp from dht is served from this cache and the check_is_linkfile() fails in dht_readdirp_cbk() thereby not filtering it.

Version-Release number of selected component (if applicable):
master, 3.10

How reproducible:
Always

Steps to Reproduce:
1. Create a dist volume, fuse mount it, create  a file
2. Rename the file so that it hashes to a different brick, creating a linkto file
3. Enable performance,parallel-readdir
4. Do ls from the mount ,it will show both the file and the T file

Actual results:
As above

Expected results:
Should not display the linkto file.

--- Additional comment from Ravishankar N on 2017-03-13 21:07:39 EDT ---

Reported by a user at http://lists.gluster.org/pipermail/gluster-users/2017-March/030254.html

--- Additional comment from Worker Ant on 2017-03-15 01:39:54 EDT ---

REVIEW: https://review.gluster.org/16902 (dht: The xattrs sent in readdirp should be sent in opendir aswell) posted (#1) for review on master by Poornima G (pgurusid)

--- Additional comment from Worker Ant on 2017-03-15 03:02:25 EDT ---

REVIEW: https://review.gluster.org/16902 (dht: The xattrs sent in readdirp should be sent in opendir aswell) posted (#2) for review on master by Poornima G (pgurusid)

Comment 1 Worker Ant 2017-03-26 02:23:42 UTC
REVIEW: https://review.gluster.org/16947 (dht: The xattrs sent in readdirp should be sent in opendir aswell) posted (#1) for review on release-3.10 by Poornima G (pgurusid)

Comment 2 Worker Ant 2017-04-13 06:19:53 UTC
REVIEW: https://review.gluster.org/16947 (dht: The xattrs sent in readdirp should be sent in opendir aswell) posted (#2) for review on release-3.10 by Poornima G (pgurusid)

Comment 3 Worker Ant 2017-04-13 11:15:50 UTC
REVIEW: https://review.gluster.org/17057 (dht: Add missing braces in dht_opendir) posted (#1) for review on master by Poornima G (pgurusid)

Comment 4 Worker Ant 2017-04-27 10:49:50 UTC
COMMIT: https://review.gluster.org/16947 committed in release-3.10 by Raghavendra Talur (rtalur) 
------
commit ec6f8cfa87bed289c498cd5f0f7daee88d257d74
Author: Poornima G <pgurusid>
Date:   Wed Mar 15 10:26:28 2017 +0530

    dht: The xattrs sent in readdirp should be sent in opendir aswell
    
    As readdir-ahead can be loaded as a child of dht, dht has to specify
    the xattrs it is intrested in, as part of opendir call itself.
    
    >Reviewed-on: https://review.gluster.org/16902
    >Smoke: Gluster Build System <jenkins.org>
    >Reviewed-by: Raghavendra G <rgowdapp>
    >NetBSD-regression: NetBSD Build System <jenkins.org>
    >CentOS-regression: Gluster Build System <jenkins.org>
    >(cherry picked from commit 0f71338e1d7c0b70f4fe3b19c68612fe730d9de2)
    
    Change-Id: I012ef96cc143b0cef942df78aa7150d85ec38606
    BUG: 1435942
    Signed-off-by: Poornima G <pgurusid>
    Reviewed-on: https://review.gluster.org/16947
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Prashanth Pai <ppai>
    Reviewed-by: Raghavendra G <rgowdapp>

Comment 5 Worker Ant 2017-05-14 01:05:34 UTC
REVIEW: https://review.gluster.org/17285 (dht: Add missing braces in dht_opendir) posted (#1) for review on release-3.10 by Raghavendra Talur (rtalur)

Comment 6 Raghavendra Talur 2017-05-14 01:14:05 UTC
One of the two patches that were sent on master were missing from 3.10.

master: https://review.gluster.org/17057

I have created a backport of it at https://review.gluster.org/#/c/17285/1

Comment 7 Worker Ant 2017-05-14 08:35:07 UTC
COMMIT: https://review.gluster.org/17285 committed in release-3.10 by Raghavendra Talur (rtalur) 
------
commit aae7b5490feea555f785fa3f734e2251ea8fdbf5
Author: Poornima G <pgurusid>
Date:   Thu Apr 13 16:44:44 2017 +0530

    dht: Add missing braces in dht_opendir
    
    
    
    >Change-Id: I6adce98f52e17953f501bc590ff7189cceac3c31
    >BUG: 1431908
    >Signed-off-by: Poornima G <pgurusid>
    >Reviewed-on: https://review.gluster.org/17057
    >Smoke: Gluster Build System <jenkins.org>
    >NetBSD-regression: NetBSD Build System <jenkins.org>
    >CentOS-regression: Gluster Build System <jenkins.org>
    >Reviewed-by: Vijay Bellur <vbellur>
    (cherry picked from commit af218797fa98f2f75594fc9ae595f184682f1a0d)
    
    Change-Id: I6adce98f52e17953f501bc590ff7189cceac3c31
    BUG: 1435942
    Reviewed-on: https://review.gluster.org/17285
    Tested-by: Raghavendra Talur <rtalur>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Raghavendra Talur <rtalur>

Comment 8 Raghavendra Talur 2017-05-31 20:47:07 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.10.2, please open a new bug report.