The mount structure contains information that's common across multiple attributes structures.
Here are the contents of the mount structure (from <sys/iofunc.h>):
typedef struct _iofunc_mount { uint32_t flags; uint32_t conf; dev_t dev; int32_t blocksize; iofunc_funcs_t *funcs; } iofunc_mount_t;
The flags member contains just one flag, IOFUNC_MOUNT_32BIT. This flag indicates that offset in the OCB, and nbytes and inode in the attributes structure, are 32-bit. Note that you can define your own flags in flags, using any of the bits from the constant IOFUNC_MOUNT_FLAGS_PRIVATE.
The conf member contains the following flags:
The dev member contains the device number and is described below in Of device numbers, inodes, and our friend rdev.
The blocksize describes the native blocksize of the device in bytes. For example, on a typical rotating-medium storage system, this would be the value 512.
Finally, the funcs pointer points to a structure (from <sys/iofunc.h>):
typedef struct _iofunc_funcs { unsigned nfuncs; IOFUNC_OCB_T *(*ocb_calloc) (resmgr_context_t *ctp, IOFUNC_ATTR_T *attr); void (*ocb_free) (IOFUNC_OCB_T *ocb); } iofunc_funcs_t;
As with the connect and I/O functions tables, the nfuncs member should be stuffed with the current size of the table. Use the constant _IOFUNC_NFUNCS for this.
The ocb_calloc and ocb_free function pointers can be filled with addresses of functions to call whenever an OCB is to be allocated or deallocated. We'll discuss why you'd want to use these functions later when we talk about extending OCBs.