[LU-3613] Get parent_fid + name for an entry Created: 22/Jul/13  Updated: 31/Oct/14  Resolved: 31/Oct/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.5.0
Fix Version/s: Lustre 2.7.0

Type: Improvement Priority: Minor
Reporter: Thomas LEIBOVICI - CEA (Inactive) Assignee: Jinshan Xiong (Inactive)
Resolution: Fixed Votes: 0
Labels: liblustreapi, patch

Issue Links:
Related
is related to LU-5837 ll_getparent improvements Resolved
is related to LU-5613 unused variable in tgt_brw_read() Resolved
Rank (Obsolete): 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.



 Comments   
Comment by Thomas LEIBOVICI - CEA (Inactive) [ 22/Jul/13 ]

pushed as change: http://review.whamcloud.com/7069

Comment by Thomas LEIBOVICI - CEA (Inactive) [ 12/Dec/13 ]

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

Comment by Thomas LEIBOVICI - CEA (Inactive) [ 01/Aug/14 ]

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.

Comment by Peter Jones [ 31/Oct/14 ]

Landed for 2.7

Comment by Henri Doreau (Inactive) [ 31/Oct/14 ]

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

Comment by Peter Jones [ 31/Oct/14 ]

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

Comment by Henri Doreau (Inactive) [ 31/Oct/14 ]

To track the follow-up patch.

Generated at Sat Feb 10 01:35:25 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.