Bug 1651098

Summary: dht_readdirp_cbk : Set inode for dir entries if inode is already linked.
Product: [Community] GlusterFS Reporter: Nithya Balachandran <nbalacha>
Component: distributeAssignee: Nithya Balachandran <nbalacha>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-04 04:24:44 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:

Description Nithya Balachandran 2018-11-19 08:21:35 UTC
Description of problem


dht_readdirp_cbk sets the entry->inode to NULL for directory entries in order to force a lookup. This causes a massive slowdown when listing directories which contain a lot of sub-directories.

If the inode for the directory is already present in the inode table, it implies that the inode was linked (ie, a lookup was performed already). If the inode for the directory entry is already linked, we do not need to send another lookup for the directory.




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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Worker Ant 2018-11-19 08:46:41 UTC
REVIEW: https://review.gluster.org/21673 (cluster/dht: Set the entry->inode if dir was lookup up earlier) posted (#1) for review on master by N Balachandran

Comment 2 Amar Tumballi 2019-06-20 04:50:04 UTC
the above patch got abandoned due to inactivity timeout, and hence moving the bug to NEW.

Comment 3 Nithya Balachandran 2019-11-04 04:24:44 UTC
This can cause stale data to be saved in the cache. Closing the BZ.