Bug 1139986

Summary: DHT + Snapshot :- If snapshot is taken when Directory is created only on hashed sub-vol; On restoring that snapshot Directory is not listed on mount point and lookup on parent is not healing
Product: [Community] GlusterFS Reporter: Raghavendra G <rgowdapp>
Component: distributeAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.5CC: gluster-bugs, kkeithle, nsathyan, racpatel, rgowdapp, spalai
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1092433 Environment:
Last Closed: 2015-04-13 07:06:46 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: 1090986, 1092433    
Bug Blocks: 1125245, 1139103    

Comment 1 Anand Avati 2014-09-10 08:37:14 UTC
REVIEW: http://review.gluster.org/8671 (DHT/readdirp: Directory not shown/healed on mount point if exists               on single brick(non first up subvolume).) posted (#1) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 2 Anand Avati 2014-09-24 15:13:40 UTC
REVIEW: http://review.gluster.org/8671 (DHT/readdirp: Directory not shown/healed on mount point if exists               on single brick(non first up subvolume).) posted (#2) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 3 Anand Avati 2014-09-25 12:00:30 UTC
REVIEW: http://review.gluster.org/8671 (DHT/readdirp: Directory not shown/healed on mount point if exists on single brick(non first up subvolume).) posted (#3) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 4 Anand Avati 2014-09-25 13:53:27 UTC
REVIEW: http://review.gluster.org/8671 (DHT/readdirp: Directory not shown/healed on mount point if exists on single brick(non first up subvolume).) posted (#4) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 5 Anand Avati 2014-10-09 05:39:56 UTC
REVIEW: http://review.gluster.org/8671 (DHT/readdirp: Directory not shown/healed on mount point if exists on single brick(non first up subvolume).) posted (#5) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 6 Anand Avati 2014-10-09 07:34:12 UTC
REVIEW: http://review.gluster.org/8671 (DHT/readdirp: Directory not shown/healed on mount point if exists on single brick(non first up subvolume).) posted (#6) for review on release-3.4 by Raghavendra G (rgowdapp)

Comment 7 Anand Avati 2014-10-20 14:28:05 UTC
REVIEW: http://review.gluster.org/8671 (DHT/readdirp: Directory not shown/healed on mount point if exists on single brick(non first up subvolume).) posted (#7) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 8 Anand Avati 2014-10-20 14:52:18 UTC
COMMIT: http://review.gluster.org/8671 committed in release-3.4 by Kaleb KEITHLEY (kkeithle) 
------
commit bc75418e1e8eacb1978bdf7f7154d49895ffd544
Author: Susant Palai <spalai>
Date:   Tue May 13 12:56:17 2014 -0400

    DHT/readdirp: Directory not shown/healed on mount point if exists on single brick(non first up subvolume).
    
    Problem: If snapshot is taken, when mkdir has succeeded only on
    hashed_subvolume, then after restoring snapshot the directory
    is not shown on mount point.
    
    Why:    dht_readdirp takes only those directory entries in to
    account, which are present on first_up_subvolume. Hence, if the
    "hashed subvolume" is not same as first_up_subvolume, it wont be listed
    on mount point and also not healed.
    
    Solution:
    Case 1: (Rebalance not running)If hashed subvolume is NULL or down then
    filter in first_up_subvolume. Other wise the corresponding hashed subvolume
    will take care of the directory entry.
    
    Case 2: If readdirp_optimize option is turned on then read from first_up_subvol
    
    Change-Id: Idaad28f1c9f688dbfb1a8a3ab8b244510c02365e
    BUG: 1139986
    Signed-off-by: Susant Palai <spalai>
    Reviewed-on: http://review.gluster.org/7599
    Reviewed-by: Raghavendra G <rgowdapp>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>
    Reviewed-on: http://review.gluster.org/8671
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Tested-by: Kaleb KEITHLEY <kkeithle>