Bug 1114814 - [gfapi] In object handle based implementation, `..' should refer to root itself when lookupat is called on root
Summary: [gfapi] In object handle based implementation, `..' should refer to root itse...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ravishankar N
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On: 1048930
Blocks: 1063794
TreeView+ depends on / blocked
 
Reported: 2014-07-01 04:54 UTC by Ravishankar N
Modified: 2014-11-11 08:36 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.6.0beta1
Doc Type: Bug Fix
Doc Text:
Clone Of: 1048930
Environment:
Last Closed: 2014-11-11 08:36:27 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
test case (3.80 KB, text/x-csrc)
2014-07-01 05:14 UTC, Ravishankar N
no flags Details

Description Ravishankar N 2014-07-01 04:54:20 UTC
+++ This bug was initially created as a clone of Bug #1048930 +++

Description of problem:

When lookupat is called on root object with `..' as path, lookup fails with ENODATA.

However, `..' lookup on root object should point to root object itself.

For example `glfs_h_creat' on root object with parameter `../foo.txt' creates foo.txt on root.

Test program attached to the bug.


How reproducible:
Always

Steps to Reproduce:
1. Create a volume
2. Run attahced program. Commandline: ./rootbug master <server-name> 2>/dev/null

Actual results:

[root@boggs rootbug]# ./rootbug master localhost 2>/dev/null 
glfs_h_lookupat: error on lookup of /(EXPECTED, PASS): from (0x1d6f990), No data available
[root@boggs rootbug]# 


Expected results:

Lookup should succeed and return stat data for master.

Comment 1 Ravishankar N 2014-07-01 05:14:19 UTC
Created attachment 913633 [details]
test case

gcc -ggdb -I /usr/local/include/glusterfs/ -L /usr/local/lib -l gfapi rootbug.c -o rootbug

Comment 2 Anand Avati 2014-07-01 05:16:05 UTC
REVIEW: http://review.gluster.org/8207 (libgfapi: succeed lookup of "/..") posted (#1) for review on master by Ravishankar N (ravishankar)

Comment 3 Anand Avati 2014-07-10 04:15:01 UTC
COMMIT: http://review.gluster.org/8207 committed in master by Vijay Bellur (vbellur) 
------
commit f5f972189b05515eaee9df2aa5afab6165887120
Author: Ravishankar N <ravishankar>
Date:   Mon Jun 30 21:50:14 2014 +0000

    libgfapi: succeed lookup of "/.."
    
    For the root dir, ".." should resolve to itself.
    
    i.e. when
            glfs_h_lookupat (fs, NULL, "/..", &stat)
    (or)
            glfs_h_lookupat (fs, root, "..", &stat)
    
    is performed, stat must contain root dir's information.
    
    Change-Id: I1c92091cdc4ff00e6b17e5fa349009c6dfc441c1
    BUG: 1114814
    Signed-off-by: Ravishankar N <ravishankar>
    Reviewed-on: http://review.gluster.org/8207
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Niels de Vos <ndevos>
    Reviewed-by: Poornima G <pgurusid>
    Reviewed-by: Prashanth Pai <ppai>
    Reviewed-by: Raghavendra Talur <rtalur>

Comment 4 Niels de Vos 2014-09-22 12:44:18 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 5 Niels de Vos 2014-11-11 08:36:27 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.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [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://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users


Note You need to log in before you can comment on or make changes to this bug.