Bug 990028 - enable gfid to path conversion
Summary: enable gfid to path conversion
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: pre-release
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Vijay Bellur
QA Contact:
URL:
Whiteboard:
: 812230 (view as bug list)
Depends On:
Blocks: 848250
TreeView+ depends on / blocked
 
Reported: 2013-07-30 09:26 UTC by Ram Raja
Modified: 2014-11-11 08:24 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.6.0beta1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 990029 (view as bug list)
Environment:
Last Closed: 2014-11-11 08:24:03 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Ram Raja 2013-07-30 09:26:35 UTC
Description of problem:
Currently marker and changelog translators for certain cases need to know the pathname of a file given just the file's gfid.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2013-08-05 13:08:39 UTC
REVIEW: http://review.gluster.org/5140 (posix: placeholders for GFID to path conversion) posted (#5) for review on master by Ramana Raja (rraja)

Comment 2 Anand Avati 2013-08-08 13:22:43 UTC
REVIEW: http://review.gluster.org/5140 (posix: placeholders for GFID to path conversion) posted (#6) for review on master by Ramana Raja (rraja)

Comment 3 Anand Avati 2013-09-17 07:49:43 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#1) for review on master by Raghavendra G (rgowdapp)

Comment 4 Anand Avati 2013-09-18 10:18:18 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#2) for review on master by Raghavendra G (rgowdapp)

Comment 5 Anand Avati 2013-09-19 08:57:31 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#3) for review on master by Raghavendra G (rgowdapp)

Comment 6 Anand Avati 2013-09-26 06:24:13 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#4) for review on master by Raghavendra G (rgowdapp)

Comment 7 Anand Avati 2013-10-04 08:17:12 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#5) for review on master by Raghavendra G (rgowdapp)

Comment 8 Anand Avati 2013-10-08 14:56:57 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#6) for review on master by Raghavendra G (rgowdapp)

Comment 9 Anand Avati 2013-10-08 16:11:27 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#7) for review on master by Raghavendra G (rgowdapp)

Comment 10 Anand Avati 2013-10-08 16:34:21 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#8) for review on master by Raghavendra G (rgowdapp)

Comment 11 Anand Avati 2013-10-08 17:02:28 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#9) for review on master by Raghavendra G (rgowdapp)

Comment 12 Anand Avati 2013-10-08 17:26:20 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#10) for review on master by Raghavendra G (rgowdapp)

Comment 13 Anand Avati 2013-10-08 17:32:12 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#11) for review on master by Raghavendra G (rgowdapp)

Comment 14 Anand Avati 2013-10-08 18:54:20 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#12) for review on master by Raghavendra G (rgowdapp)

Comment 15 Anand Avati 2013-10-08 19:03:06 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#13) for review on master by Raghavendra G (rgowdapp)

Comment 16 Anand Avati 2013-10-08 19:13:50 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#14) for review on master by Raghavendra G (rgowdapp)

Comment 17 Anand Avati 2013-10-08 20:01:24 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#15) for review on master by Raghavendra G (rgowdapp)

Comment 18 Anand Avati 2013-10-09 03:37:17 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#16) for review on master by Raghavendra G (rgowdapp)

Comment 19 Anand Avati 2013-10-09 03:53:15 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#17) for review on master by Raghavendra G (rgowdapp)

Comment 20 Anand Avati 2013-10-09 04:03:10 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#18) for review on master by Raghavendra G (rgowdapp)

Comment 21 Anand Avati 2013-10-09 04:09:57 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#19) for review on master by Raghavendra G (rgowdapp)

Comment 22 Anand Avati 2013-10-09 09:30:41 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#20) for review on master by Raghavendra G (rgowdapp)

Comment 23 Anand Avati 2013-10-10 11:17:08 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#21) for review on master by Raghavendra G (rgowdapp)

Comment 24 Anand Avati 2013-10-10 12:10:38 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#22) for review on master by Raghavendra G (rgowdapp)

Comment 25 Anand Avati 2013-10-10 13:53:33 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#23) for review on master by Raghavendra G (rgowdapp)

Comment 26 Anand Avati 2013-10-10 15:30:51 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#24) for review on master by Raghavendra G (rgowdapp)

Comment 27 Anand Avati 2013-10-10 15:42:09 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#25) for review on master by Raghavendra G (rgowdapp)

Comment 28 Anand Avati 2013-10-10 15:57:15 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#26) for review on master by Raghavendra G (rgowdapp)

Comment 29 Anand Avati 2013-10-10 16:07:58 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#27) for review on master by Raghavendra G (rgowdapp)

Comment 30 Anand Avati 2013-10-11 09:47:01 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#28) for review on master by Raghavendra G (rgowdapp)

Comment 31 Anand Avati 2013-10-11 12:17:13 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#29) for review on master by Raghavendra G (rgowdapp)

Comment 32 Anand Avati 2013-10-12 01:42:55 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#30) for review on master by Raghavendra G (rgowdapp)

Comment 33 Anand Avati 2013-10-16 06:05:09 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#31) for review on master by Raghavendra G (rgowdapp)

Comment 34 Anand Avati 2013-10-24 12:29:59 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#32) for review on master by Raghavendra G (rgowdapp)

Comment 35 Anand Avati 2013-10-28 05:56:25 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#33) for review on master by Raghavendra G (rgowdapp)

Comment 36 Anand Avati 2013-10-28 10:21:09 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#34) for review on master by Raghavendra G (rgowdapp)

Comment 37 Anand Avati 2013-10-28 13:49:12 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#35) for review on master by Krishnan Parthasarathi (kparthas)

Comment 38 Anand Avati 2013-10-28 16:37:50 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#36) for review on master by Krishnan Parthasarathi (kparthas)

Comment 39 Anand Avati 2013-10-31 06:02:28 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#37) for review on master by Raghavendra G (rgowdapp)

Comment 40 Anand Avati 2013-11-04 11:12:41 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#38) for review on master by Raghavendra G (rgowdapp)

Comment 41 Anand Avati 2013-11-11 13:57:43 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#39) for review on master by Raghavendra G (rgowdapp)

Comment 42 Anand Avati 2013-11-11 16:31:44 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#40) for review on master by Raghavendra G (rgowdapp)

Comment 43 Anand Avati 2013-11-11 18:07:06 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#41) for review on master by Raghavendra G (rgowdapp)

Comment 44 Anand Avati 2013-11-12 15:12:18 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#42) for review on master by Raghavendra G (rgowdapp)

Comment 45 Anand Avati 2013-11-13 11:16:55 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#43) for review on master by Raghavendra G (rgowdapp)

Comment 46 Anand Avati 2013-11-14 12:03:24 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#44) for review on master by Raghavendra G (rgowdapp)

Comment 47 Anand Avati 2013-11-14 12:44:08 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#45) for review on master by Raghavendra G (rgowdapp)

Comment 48 Anand Avati 2013-11-26 06:05:16 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#64) for review on master by Raghavendra G (rgowdapp)

Comment 49 Anand Avati 2013-11-26 10:44:59 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#65) for review on master by Raghavendra G (rgowdapp)

Comment 50 Anand Avati 2013-11-26 11:40:16 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#66) for review on master by Raghavendra G (rgowdapp)

Comment 51 Anand Avati 2013-11-26 12:28:17 UTC
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#67) for review on master by Raghavendra G (rgowdapp)

Comment 52 Anand Avati 2013-11-26 18:22:48 UTC
COMMIT: http://review.gluster.org/5951 committed in master by Anand Avati (avati) 
------
commit d6dc8d0e9e2052818c9858f6b073a8bacc3fca88
Author: Raghavendra G <rgowdapp>
Date:   Mon Sep 16 17:50:25 2013 +0530

    posix: placeholders for GFID to path conversion
    
    what?
    =====
        The following is an attempt to generate the paths of a file when
        only its gfid is known.
    
        To find the path of a directory, the symlink handle to the
        directory maintained in  the ".glusterfs" backend directory is
        read. The symlink handle is generated using the gfid of the
        directory. It (handle) contains the directory's name and parent
        gfid, which are used to recursively construct the absolute path as
        seen by the user from the mount point.
    
        A similar approach cannot be used for a regular file or a symbolic
        link since its hardlink handle, generated using its gfid, doesn't
        contain its parent gfid and basename. So xattrs are set to store
        the parent gfids and the number of hardlinks to a file or a
        symlink having the same parent gfid.  When an user/application
        requests for the paths of a regular file or a symlink with
        multiple hardlinks, using the parent gfids stored in the xattrs,
        the paths of the parent directories are generated as mentioned
        earlier. The base names of the hardlinks (with the same parent
        gfid) are determined by matching the actual backend inode numbers
        of each entry in the parent directory with that of the hardlink
        handle.
    
        Xattr is set on a regular file, link, and symbolic link as
        follows, Xattr name : trusted.pgfid.<pargfidstr> Xattr value :
        <number of hardlinks to a regular file/symlink with the same
        parentgfid>
    
        If a regular file, hard link, symbolic link is created then an
        xattr in the above format is set in the backend.
    
    how to use?
    ===========
        This functionality can be used through getxattr interface. Two
        keys - glusterfs.ancestry.dentry and glusterfs.ancestry.path - enable
        usage of this functionality. A successful getxattr will have the
        result stored under same keys. Values will be,
    
        glusterfs.ancestry.dentry:
        --------------------------
        A linked list of gf-dirent structures for all possible paths from
        root to this gfid. If there are multiple paths, the linked-list
        will be a series of paths one after another. Each path will be a
        series of dentries representing all components of the path. This
        key is primarily for internal usage within glusterfs.
    
        glusterfs.ancestry.path:
        ------------------------
        A string containing all possible paths from root to this gfid.
        Multiple hardlinks of a file or a symlink are displayed as a colon
        seperated list (this could interfere with path components
        containing ':').
    
        e.g. If there is a file "file1" in root directory with two hardlinks,
             "/dir2/link2tofile1" and "/dir1/link1tofile1", then
    
             [root@alpha gfsmntpt]# getfattr -n glusterfs.ancestry.path -e text
              file1
              glusterfs.ancestry.path="/file1:/dir2/link2tofile1:/dir1/link1tofile1"
    
        Thanks Amar, Avati and Venky for the inputs.
    
    Original Author: Ramana Raja <rraja>
    BUG: 990028
    Signed-off-by: Raghavendra G <rgowdapp>
    Change-Id: I0eaa9101e333e0c1f66ccefd9e95944dd4a27497
    Reviewed-on: http://review.gluster.org/5951
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 53 Anand Avati 2014-01-22 06:06:29 UTC
REVIEW: http://review.gluster.org/6756 (storage/posix: HANDLE_PFX is redundant use GF_HIDDEN_PATH instead) posted (#1) for review on master by Harshavardhana (harsha)

Comment 54 Anand Avati 2014-01-23 05:04:40 UTC
COMMIT: http://review.gluster.org/6756 committed in master by Vijay Bellur (vbellur) 
------
commit 7bea98fa5845ced670d7bb2d9b1336c03855a798
Author: Harshavardhana <harsha>
Date:   Tue Jan 21 22:03:41 2014 -0800

    storage/posix: HANDLE_PFX is redundant use GF_HIDDEN_PATH instead
    
    GF_HIDDEN_PATH usage would help in better readability of the code
    and avoids bugs produced from redundant macro constants.
    
    Change-Id: I2fd7e92e87783ba462ae438ced2cf4f720a25f5c
    BUG: 990028
    Signed-off-by: Harshavardhana <harsha>
    Reviewed-on: http://review.gluster.org/6756
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra G <rgowdapp>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 55 Niels de Vos 2014-07-11 15:08:58 UTC
*** Bug 812230 has been marked as a duplicate of this bug. ***

Comment 56 John 2014-07-22 00:00:35 UTC
Oh for chrissake.

Comment 57 Niels de Vos 2014-09-22 12:32:12 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 58 Niels de Vos 2014-11-11 08:24:03 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.