dm_make_xhandle

Converts a file system ID, inode number, inode generation count, and snapshot ID into a handle.

Synopsis

int dm_make_xhandle(
    dm_fsid_t               *fsidp,         /* IN */
    dm_ino_t                *inop,          /* IN */
    dm_igen_t               *igenp,         /* IN */
    dm_snap_t               *isnapp,        /* IN */
    void                    **hanpp,        /* OUT */
    size_t                  *hlenp          /* OUT */
);

Description

Use the dm_make_xhandle() function to convert a file system ID, inode number, inode generation count, and snapshot ID into a handle. dm_make_xhandle() is a GPFS-specific DMAPI function. It is not part of the open standard.

Parameters

dm_fsid_t *fsidp (IN)
The file system ID.
dm_ino_t *inop (IN)
The inode number.
dm_igen_t *igenp (IN)
The inode generation count.
dm_snap_t *isnapp (IN)
The snapshot ID.
void **hanpp (OUT)
A DMAPI initialized pointer that identifies a region of memory containing an opaque DM handle. The caller is responsible for freeing the allocated memory.
size_t *hlenp (OUT)
The length of the handle in bytes.

Return values

Zero is returned on success. On error, -1 is returned, and the global errno is set to one of the following values:
[EBADF]
The file handle does not refer to an existing or accessible object.
[EFAULT]
The system detected an invalid address in attempting to use an argument.
[EINVAL]
The argument token is not a valid token.
[ENOMEM]
DMAPI could not obtain the required resources to complete the call.
[ENOSYS]
Function is not supported by the DM implementation.
[EPERM]
The caller does not hold the appropriate privilege.

See also

dm_handle_to_snap