Details

    • 9289

    Description

      Getting all parent fid + name of an entry currently requires several calls with the current api, and is a big waste of RPCs:
      To get all path for an entry, we need to call fid2path,
      so this needs to call path2fid first, as fid2path requires a fid argument.
      Then, we need to call path2fid again for each path returned by fid2path.

      It would be much simpler to provide a wrapper that would directly read and decode link ea information.
      This would return all parent_fid+name for a given path.
      (this would also implements a fid -> parent_fid+name interface,
      by passing a path in .lustre/fid).

      I'll submit a patch to be (hopefully) included in 2.5.

      Attachments

        Issue Links

          Activity

            [LU-3613] Get parent_fid + name for an entry

            To track the follow-up patch.

            hdoreau Henri Doreau (Inactive) added a comment - To track the follow-up patch.
            pjones Peter Jones added a comment -

            I think that would be best. We can link the new ticket to this one

            pjones Peter Jones added a comment - I think that would be best. We can link the new ticket to this one

            There'll be a follow-up patch to implement improvements the reviewers suggested on gerrit. Shall I open a new ticket for that?

            hdoreau Henri Doreau (Inactive) added a comment - There'll be a follow-up patch to implement improvements the reviewers suggested on gerrit. Shall I open a new ticket for that?
            pjones Peter Jones added a comment -

            Landed for 2.7

            pjones Peter Jones added a comment - Landed for 2.7

            Since 2.6.0, definitions of link_ea* structures is no longer part of installed headers accessible for client applications (previously in lustre_idl.h).
            This is definitely cleaner, but now there is no possible workaround to decode linkea directly as a client application.
            So this patch (http://review.whamcloud.com/7069) becomes a requirement to get parent FID for an entry in Lustre 2.6.

            leibovici-cea Thomas LEIBOVICI - CEA (Inactive) added a comment - Since 2.6.0, definitions of link_ea* structures is no longer part of installed headers accessible for client applications (previously in lustre_idl.h). This is definitely cleaner, but now there is no possible workaround to decode linkea directly as a client application. So this patch ( http://review.whamcloud.com/7069 ) becomes a requirement to get parent FID for an entry in Lustre 2.6.

            The change has Jenkins and Maloo green lights - if you can take a look at it. Thanks.

            leibovici-cea Thomas LEIBOVICI - CEA (Inactive) added a comment - The change has Jenkins and Maloo green lights - if you can take a look at it. Thanks.
            leibovici-cea Thomas LEIBOVICI - CEA (Inactive) added a comment - pushed as change: http://review.whamcloud.com/7069

            People

              jay Jinshan Xiong (Inactive)
              leibovici-cea Thomas LEIBOVICI - CEA (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: