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 requre 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.

SEE ALSO
free(3), llapi_fid_parse(3), llapi_fid2path(3), llapi_path2fid(3), lustreapi(7), name_to_handle(2) open_by_handle_at(2)