Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1163570

Summary: Dentries with trailing '/' are added when quota is enabled in bricks
Product: [Community] GlusterFS Reporter: Pranith Kumar K <pkarampu>
Component: coreAssignee: Pranith Kumar K <pkarampu>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: bugs, rabhat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-v3.6.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1158751 Environment:
Last Closed: 2016-02-04 15:09:05 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: 1158751, 1178134    
Bug Blocks:    

Description Pranith Kumar K 2014-11-13 03:21:41 UTC
+++ This bug was initially created as a clone of Bug #1158751 +++

Description of problem:
    inode_link is sometimes called with a trailing '/'. Lookup, dentry
    operations like link/unlink/mkdir/rmdir/rename etc come without trailing
    '/' so the stale dentry with '/' remains in the dentry list of the inode.


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


How reproducible:
always with quota

Steps to Reproduce:
1. create plain replicate volume 'r2'
2. create a directory hierarcy a/b/c
3. open fd exec 5>a/b/c/f.txt
4. kill 1st brick and restart it
5. write something to fd i.e. echo abc >&5
6. This populates dentries with names with trailing '/'

Actual results:


Expected results:


Additional info:

--- Additional comment from Anand Avati on 2014-10-30 02:14:24 EDT ---

REVIEW: http://review.gluster.org/9004 (inode: Canonicalize filename for dentry creation) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-11-03 10:48:30 EST ---

REVIEW: http://review.gluster.org/9004 (inode: Handle '/' in basename in inode_link/unlink) posted (#2) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-11-06 01:18:16 EST ---

REVIEW: http://review.gluster.org/9004 (inode: Handle '/' in basename in inode_link/unlink) posted (#3) for review on master by Pranith Kumar Karampuri (pkarampu)

--- Additional comment from Anand Avati on 2014-11-07 12:42:33 EST ---

COMMIT: http://review.gluster.org/9004 committed in master by Vijay Bellur (vbellur) 
------
commit 0d7fd69b01cf9aebb4f1517f064e89ff65b9ccf8
Author: Pranith Kumar K <pkarampu>
Date:   Thu Oct 30 10:56:17 2014 +0530

    inode: Handle '/' in basename in inode_link/unlink
    
    Problem:
    inode_link is sometimes called with a trailing '/'. Lookup, dentry
    operations like link/unlink/mkdir/rmdir/rename etc come without trailing
    '/' so the stale dentry with '/' remains in the dentry list of the inode.
    
    Fix:
    Add assert checks and return NULL for '/' in bname.
    Fix ancestry building code to call without '/' at the end.
    
    Change-Id: I9c71292a3ac27754538a4e75e53290e182968fad
    BUG: 1158751
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/9004
    Reviewed-by: Niels de Vos <ndevos>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 1 Anand Avati 2014-11-13 03:24:15 UTC
REVIEW: http://review.gluster.org/9111 (inode: Handle '/' in basename in inode_link/unlink) posted (#1) for review on release-3.6 by Pranith Kumar Karampuri (pkarampu)

Comment 2 Anand Avati 2014-11-17 07:36:46 UTC
COMMIT: http://review.gluster.org/9111 committed in release-3.6 by Vijay Bellur (vbellur) 
------
commit 139e8d797bf48acfbc422a7d12740c65c34790fc
Author: Pranith Kumar K <pkarampu>
Date:   Thu Oct 30 10:56:17 2014 +0530

    inode: Handle '/' in basename in inode_link/unlink
    
            Backport of http://review.gluster.org/9004
    
    Problem:
    inode_link is sometimes called with a trailing '/'. Lookup, dentry
    operations like link/unlink/mkdir/rmdir/rename etc come without trailing
    '/' so the stale dentry with '/' remains in the dentry list of the inode.
    
    Fix:
    Add assert checks and return NULL for '/' in bname.
    Fix ancestry building code to call without '/' at the end.
    
    BUG: 1163570
    Change-Id: I96655a0eb4678f80082705ab167327e72f54fa45
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/9111
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 3 Kaushal 2016-02-04 15:09:05 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-v3.6.2, please open a new bug report.

glusterfs-v3.6.2 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2015/01/glusterfs-3-6-2-ga-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user