| LLAPI_FID_TO_HANDLE(3) | Lustre Library Functions | LLAPI_FID_TO_HANDLE(3) |
NAME
llapi_fid_to_handle - allocate an NFS handle for File Identifier
SYNOPSIS
#include <lustre/lustreapi.h>
int llapi_fid_to_handle(struct file_handle **handle, struct lu_fid *fid);
DESCRIPTION
llapi_fid_to_handle() allocates an NFS file handle for the File Identifier given by fid for later use by open_by_handle_at(2). This is similar to the name_to_handle_at(2) function, and is useful for Lustre-specific tools and interfaces. While the llapi_fid_to_handle(3) function does not require root access itself, the open_by_handle_at(2) function does require root access since this bypasses all pathname-derived file access permissions. The memory allocated for handle and returned to the caller must be freed with free(2).
RETURN VALUES
returns 0 on success or a negative errno on failure.
ERRORS
- -ENOMEM
- No memory was available for allocating handle.
AVAILABILITY
llapi_fid_to_handle() is part of the lustre(7) user application interface library since release 2.16.0
SEE ALSO
name_to_handle(2), open_by_handle_at(2), free(3), llapi_fid_parse(3), llapi_fid2path(3), llapi_path2fid(3), lustreapi(7),
| 2024-08-23" | Lustre User API |