[Bugs] [Bug 1218383] [Backup]: To capture path for deletes in changelog file

bugzilla at redhat.com bugzilla at redhat.com
Tue May 5 13:02:27 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1218383



--- Comment #2 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/10535 committed in release-3.7 by Vijay
Bellur (vbellur at redhat.com) 
------
commit edfe56dfd8ceb4ef0c160484de04af30e8f5b7df
Author: Kotresh HR <khiremat at redhat.com>
Date:   Tue Apr 14 14:42:46 2015 +0530

    feature/changelog: Capture path for deletes

    PROBLEM:
    There is no way to get the path of deleted file if we
    have gfid from changelog since the file is already deleted.

    SOLUTION:
    Do a recursive readlink on parent gfid in backend .glusterfs
    path to get the complete path in I/O callpath in changelog
    translator and capture it in callback.

    The path captured is relative from the brick root. The field
    separator used is '\0'.
    e.g.,
    ......\0<pgfid>/bname\0<relative-path>\0<next-record>

    ADDITIONAL REQUIRED CHANGES:

    1. The changelog translator option called "changelog.capture-del-path"
       is introduced to enable or disable the capturing of deleted entry
       path.
       e.g.,
       gluster vol set <vol-name> changelog.capture-del-path on/off

       If capture-del-path is disabled, '\0' is captured instead of
       relative path.
       e.g.,
       ......\0<pgfid>/bname\0\0\0<next-record>

    2. The minor number in the version of changelog is bumped up from v1.1
       to v1.2.

    3. If recursive readlink is failed for some reason, it will capture
       \0 in place of <relative path>.
       e.g.,
       ......\0<pgfid>/bname\0\0\0<next-record>
       (same as when caputre-del-path option is disabled)

    4. If bname argument passed to "resolve_pargfid_to_path" function
       is NULL and pargfid is ROOT, "." is returned. This is not the
       case with changelog, where bname is always passed. This is
       applicable to other consumers of "resolve_pargfid_to_path"
       routine.

    NOTE:
       Changelog parser should consider the above new changes
       and should parse accordingly.

    BUG: 1218383
    Change-Id: I5d89cf4157befd207771f6c0248d2493fbf85832
    Signed-off-by: Kotresh HR <khiremat at redhat.com>
    Reviewed-on: http://review.gluster.org/10288
    Reviewed-on: http://review.gluster.org/10535
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Tested-by: NetBSD Build System
    Reviewed-by: Aravinda VK <avishwan at redhat.com>
    Reviewed-by: Vijay Bellur <vbellur at redhat.com>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.


More information about the Bugs mailing list