Enhancements to data structures
This is a description of GPFS enhancements to data structures defined in the XDSM standard.
For complete C declarations of all the data structures that are
used in DMAPI for GPFS, refer
to the dmapi_types.h file located in the /usr/lpp/mmfs/include directory.
- All file offsets and sizes in DMAPI data structures are 64 bits long.
- Names or path names that are passed in event messages are character strings, terminated by a null character. The length of the name buffer, as specified in the dm_vardata_t structure, includes the null character.
- The dm_region_t structure has a new 4-byte field, rg_opaque. The DMAPI implementation does not interpret rg_opaque. The DM application can use this field to store additional information within the managed region.
- The dt_change field in the dm_stat structure is not implemented in the inode. The value will change each time it is returned by the dm_get_fileattr function.
- The dt_dtime field in the dm_stat structure is overloaded on the dt_ctime field.
- The dm_eventmsg structure has a 4 byte field, ev_nodeid that uniquely identifies the node that generated the event. The id is the GPFS cluster data node number, which is attribute node_number in the mmsdrfs2 file for a PSSP node or mmsdrfs file for any other type of node.
- The ne_mode field in the dm_namesp_event structure has an additional flag, DM_LOCAL_MOUNT. For the events preunmount and unmount when this flag is set, the unmount operation is local to the session node. See Mount and unmount. The me_mode field in the dm_mount_event structure has two additional flags; DM_LOCAL_MOUNT, and DM_REMOTE_MOUNT. See Mount and unmount.
- There are two 'quick access' single-bit opaque DM attributes for each file, stored directly in the inode. See Data Management attributes.
- The
data type dm_eventset_t is implemented as
a bit map, containing one bit for each event that is defined in DMAPI.
The bit is set if, and only if, the event is present.
Variables of type dm_eventset_t should be manipulated only using special macros. The XDSM standard provides a basic set of such macros. GPFS provides a number of additional macros. The names of all such macros begin with the prefix DMEV_.
This is the list of additional macros that are provided in DMAPI for GPFS:- DMEV_ALL(eset)
- Add all events to eset
- DMEV_ISZERO(eset)
- Check if eset is empty
- DMEV_ISALL(eset)
- Check if eset contains all events
- DMEV_ADD(eset1, eset2)
- Add to eset2 all events in eset1
- DMEV_REM(eset1, eset2)
- Remove from eset2 all events in eset1
- DMEV_RES(eset1, eset2)
- Restrict eset2 by eset1
- DMEV_ISEQ(eset1, eset2)
- Check if eset1 and eset2 are equal
- DMEV_ISDISJ(eset1, eset2)
- Check if eset1 and eset2 are disjoint
- DMEV_ISSUB(eset2)
- Check if eset1 is a subset of eset2
- DMEV_NORM(eset)
- Normalize the internal format of eset, clearing all unused bits
- DMAPI for GPFS provides
a set of macros for comparison of token ids (value of type dm_token_t).
- DM_TOKEN_EQ (x,y)
- Check if x and y are the same
- DM_TOKEN_NE (x,y)
- Check if x and y are different
- DM_TOKEN_LT (x,y)
- Check if x is less than y
- DM_TOKEN_GT (x,y)
- Check if x is greater than y
- DM_TOKEN_LE (x,y)
- Check if x is less than or equal to y
- DM_TOKEN_GE (x,y)
- Check if x is greater than or equal to y