Bug 990028 - enable gfid to path conversion
enable gfid to path conversion
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: posix (Show other bugs)
pre-release
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Vijay Bellur
:
: 812230 (view as bug list)
Depends On:
Blocks: 848250
  Show dependency treegraph
 
Reported: 2013-07-30 05:26 EDT by Ram Raja
Modified: 2014-11-11 03:24 EST (History)
4 users (show)

See Also:
Fixed In Version: glusterfs-3.6.0beta1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 990029 (view as bug list)
Environment:
Last Closed: 2014-11-11 03:24:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ram Raja 2013-07-30 05:26:35 EDT
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 09:08:39 EDT
REVIEW: http://review.gluster.org/5140 (posix: placeholders for GFID to path conversion) posted (#5) for review on master by Ramana Raja (rraja@redhat.com)
Comment 2 Anand Avati 2013-08-08 09:22:43 EDT
REVIEW: http://review.gluster.org/5140 (posix: placeholders for GFID to path conversion) posted (#6) for review on master by Ramana Raja (rraja@redhat.com)
Comment 3 Anand Avati 2013-09-17 03:49:43 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#1) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 4 Anand Avati 2013-09-18 06:18:18 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#2) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 5 Anand Avati 2013-09-19 04:57:31 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#3) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 6 Anand Avati 2013-09-26 02:24:13 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#4) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 7 Anand Avati 2013-10-04 04:17:12 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#5) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 8 Anand Avati 2013-10-08 10:56:57 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#6) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 9 Anand Avati 2013-10-08 12:11:27 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#7) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 10 Anand Avati 2013-10-08 12:34:21 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#8) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 11 Anand Avati 2013-10-08 13:02:28 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#9) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 12 Anand Avati 2013-10-08 13:26:20 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#10) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 13 Anand Avati 2013-10-08 13:32:12 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#11) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 14 Anand Avati 2013-10-08 14:54:20 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#12) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 15 Anand Avati 2013-10-08 15:03:06 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#13) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 16 Anand Avati 2013-10-08 15:13:50 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#14) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 17 Anand Avati 2013-10-08 16:01:24 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#15) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 18 Anand Avati 2013-10-08 23:37:17 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#16) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 19 Anand Avati 2013-10-08 23:53:15 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#17) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 20 Anand Avati 2013-10-09 00:03:10 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#18) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 21 Anand Avati 2013-10-09 00:09:57 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#19) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 22 Anand Avati 2013-10-09 05:30:41 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#20) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 23 Anand Avati 2013-10-10 07:17:08 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#21) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 24 Anand Avati 2013-10-10 08:10:38 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#22) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 25 Anand Avati 2013-10-10 09:53:33 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#23) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 26 Anand Avati 2013-10-10 11:30:51 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#24) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 27 Anand Avati 2013-10-10 11:42:09 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#25) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 28 Anand Avati 2013-10-10 11:57:15 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#26) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 29 Anand Avati 2013-10-10 12:07:58 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#27) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 30 Anand Avati 2013-10-11 05:47:01 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#28) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 31 Anand Avati 2013-10-11 08:17:13 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#29) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 32 Anand Avati 2013-10-11 21:42:55 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#30) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 33 Anand Avati 2013-10-16 02:05:09 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#31) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 34 Anand Avati 2013-10-24 08:29:59 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#32) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 35 Anand Avati 2013-10-28 01:56:25 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#33) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 36 Anand Avati 2013-10-28 06:21:09 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#34) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 37 Anand Avati 2013-10-28 09:49:12 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#35) for review on master by Krishnan Parthasarathi (kparthas@redhat.com)
Comment 38 Anand Avati 2013-10-28 12:37:50 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#36) for review on master by Krishnan Parthasarathi (kparthas@redhat.com)
Comment 39 Anand Avati 2013-10-31 02:02:28 EDT
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#37) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 40 Anand Avati 2013-11-04 06:12:41 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#38) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 41 Anand Avati 2013-11-11 08:57:43 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#39) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 42 Anand Avati 2013-11-11 11:31:44 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#40) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 43 Anand Avati 2013-11-11 13:07:06 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#41) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 44 Anand Avati 2013-11-12 10:12:18 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#42) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 45 Anand Avati 2013-11-13 06:16:55 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#43) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 46 Anand Avati 2013-11-14 07:03:24 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#44) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 47 Anand Avati 2013-11-14 07:44:08 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#45) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 48 Anand Avati 2013-11-26 01:05:16 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#64) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 49 Anand Avati 2013-11-26 05:44:59 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#65) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 50 Anand Avati 2013-11-26 06:40:16 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#66) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 51 Anand Avati 2013-11-26 07:28:17 EST
REVIEW: http://review.gluster.org/5951 (posix: placeholders for GFID to path conversion) posted (#67) for review on master by Raghavendra G (rgowdapp@redhat.com)
Comment 52 Anand Avati 2013-11-26 13:22:48 EST
COMMIT: http://review.gluster.org/5951 committed in master by Anand Avati (avati@redhat.com) 
------
commit d6dc8d0e9e2052818c9858f6b073a8bacc3fca88
Author: Raghavendra G <rgowdapp@redhat.com>
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@redhat.com>
    BUG: 990028
    Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
    Change-Id: I0eaa9101e333e0c1f66ccefd9e95944dd4a27497
    Reviewed-on: http://review.gluster.org/5951
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Anand Avati <avati@redhat.com>
Comment 53 Anand Avati 2014-01-22 01:06:29 EST
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@harshavardhana.net)
Comment 54 Anand Avati 2014-01-23 00:04:40 EST
COMMIT: http://review.gluster.org/6756 committed in master by Vijay Bellur (vbellur@redhat.com) 
------
commit 7bea98fa5845ced670d7bb2d9b1336c03855a798
Author: Harshavardhana <harsha@harshavardhana.net>
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@harshavardhana.net>
    Reviewed-on: http://review.gluster.org/6756
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Comment 55 Niels de Vos 2014-07-11 11:08:58 EDT
*** Bug 812230 has been marked as a duplicate of this bug. ***
Comment 56 John 2014-07-21 20:00:35 EDT
Oh for chrissake.
Comment 57 Niels de Vos 2014-09-22 08:32:12 EDT
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 03:24:03 EST
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.