1 .TH llapi_path2parent 3 "2014 Oct 13" "Lustre User API"
3 llapi_path2parent, llapi_fd2parent \- Retrieve <parent FID>/name(s) for an entry
7 .B #include <lustre/lustreapi.h>
9 .BI "int llapi_path2parent(const char *" path ", unsigned int " linkno ","
10 .BI " struct lu_fid *" parent_fid ", char *" name ","
11 .BI " size_t " name_size );
13 .BI "int llapi_fd2parent(int " fd ", unsigned int " linkno ","
14 .BI " struct lu_fid *" parent_fid ", char *" name ","
15 .BI " size_t " name_size );
20 .BR llapi_path2parent()
23 stores the FID of the parent directory into
25 and the NUL-terminated name of the entry into the buffer
27 which is expected to be of size
31 should be initialized to
33 when starting to iterate over all links of a file. The function
35 behaves similarly except that it operates on an open file descriptor
40 0 is returned on success or a negative errno value on failure.
44 linkno has reached the total link count of the file.
50 does not reside on a Lustre filesystem.
57 An invalid argument was specified.
60 The given buffer was too small to hold the pathname.
63 The file cannot be open by user or CAP_DAC_READ_SEARCH is not granted.
66 .BR llapi_fid2path (3),
67 .BR llapi_path2fid (3),