dm_sync_dmattr_by_handle
Synchronizes one or more files' in-memory attributes with those on the physical medium.
Synopsis
int m_sync_dmattr_by_handle(
dm_sessid_t sid,
void *hanp,
size_t hlen,
dm_token_t token
);
Description
Use the dm_sync_dmattr_by_handle function to synchronize one or more files' in-memory attributes with those on the physical medium.
dm_sync_dmattr_by_handle is a GPFS-specific DMAPI function; it is not part of the open standard. It has the same purpose, parameters, and return values as the standard DMAPI dm_sync_by_handle function, except that it flushes only the attributes, not the file data.
Like dm_sync_by_handle, dm_sync_dmattr_by_handle commits all previously unsynchronized updates for that node, not just the updates for one file. Therefore, if you update a list of files and call dm_sync_dmattr_by_handle on the last file, the attribute updates to all of the files in the list are made persistent.
Parameters
- dm_sessid_t sid (IN)
- The identifier for the session of interest.
- void *hanp (IN)
- The handle for the file whose attributes are to be synchronized.
- size_t hlen (IN)
- The length of the handle in bytes.
- dm_token_t *token (IN)
- The token referencing the access right for the handle. The access right must be DM_RIGHT_EXCL, or the token DM_NO_TOKEN may be used and the interface acquires the appropriate rights.
Return values
- [EACCES]
- The access right referenced by the token for the handle is not DM_RIGHT_EXCL.
- [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]
- The DMAPI could not acquire the required resources to complete the call.
- [ENOSYS]
- The DMAPI implementation does not support this optional function.
- [EPERM]
- The caller does not hold the appropriate privilege.
See also
dm_remove_dmattr_nosync, dm_set_dmattr_nosync, dm_set_eventlist_nosync, and dm_set_region_nosync